The link @bummi provided is very helpful in understanding this. Here's a quote:
While fibers are carbohydrates, they do not affect your body’s sugar/glucose levels or the levels of sugar related hormones such as insulin. In fact, high fiber meals take longer to digest and therefore, affect your blood glucose more slowly. This is why it is often recommended that individuals calculating insulin needs should subtract fiber from the total carbohydrates of a food. Therefore, it is often advised that individuals following a carbohydrate-based diet plan not count dietary fiber as a carbohydrate.
For a biochemist, fiber may be a carbohydrate, but since fiber doesn't function in the body in the same way as sugars and starches, nutritional labels work as follows:
Fiber is listed separately.
Carbohydrate content is given first as a total of sugars and starches (7.2 g in your example).
Then the sugar portion of the "carbs" is listed (5.1 g in your example).
Dietitians generally recommend that people with insulin resistance, pre-diabetes, or diabetes, count carbs by subtracting off the fiber. This helps people compare two types of bread products in the grocery store. As a quick calculation, it can be helpful.