Nutrition labels take the into account how well macros are absorbed and even the calories burned to digest them (protein and carbs technically contain the same amount of calories, but protein is counted as less on the nutritional label because digesting protein burns calories).
If we still measured calories by burning food, then the calories on food with lots of fiber would be wildly inaccurate
No, that is incorrect.
Nutrition labels take the into account how well macros are absorbed and even the calories burned to digest them (protein and carbs technically contain the same amount of calories, but protein is counted as less on the nutritional label because digesting protein burns calories).
If we still measured calories by burning food, then the calories on food with lots of fiber would be wildly inaccurate