Fibre is classified as a carbohydrate but is not treated by the body as one. The distinction rests on a single fact, which is that human digestive enzymes cannot break the bonds holding it together.
The definition is about enzymes, not structure
Starch and fibre can be built from the same sugar units. What separates them is the type of chemical linkage between those units.
Human amylase cleaves one arrangement and not the other. Fibre therefore travels the length of the small intestine essentially unchanged.
Because the definition is functional rather than structural, the category contains chemically diverse materials that share only the property of resisting digestion.
Solubility determines what happens on the way
Soluble fibres dissolve in water and form viscous gels within the intestinal contents, slowing the movement and mixing of everything present.
That viscosity slows the rate at which glucose from a meal reaches the intestinal wall, which flattens the rise in blood sugar without changing the total absorbed.
Insoluble fibres do not dissolve. They add bulk and hold water, which increases stool mass and shortens transit time through the large intestine.
Bacteria complete what enzymes could not
Fibre arriving in the large intestine encounters a dense bacterial population that possesses the enzymes humans lack.
Fermentation of that material produces short-chain fatty acids, which are absorbed and used by the cells lining the colon as their preferred fuel.
This is why fibre intake affects the composition of the gut microbial population directly. It is the main food supply reaching that part of the digestive tract.
Energy content is partial and indirect
Fibre contributes some energy through those fermentation products, but considerably less per gram than digestible carbohydrate and by an indirect route.
Food labelling conventions handle this differently between countries, which is one reason the same product can carry different calorie figures in different markets.
Fermentation also produces gas, which accounts for the discomfort that often follows a sudden increase in intake and generally settles as the bacterial population adjusts.
Why extracted fibre is not equivalent to whole food
Isolated fibres added to processed products reproduce some properties, particularly viscosity, but not the structure of an intact plant cell wall.
That structure affects how quickly the rest of the food is broken down, so the same nutrients in a disrupted matrix are absorbed at a different rate.
Anyone with an inflammatory bowel condition or a history of obstruction should establish appropriate intake with a clinician, since general advice does not apply.