As I understand it, what's actually subtracted from the calorie counts on nutritional labels is a very rough estimate of the number of calories that aren't actually available because they're stuff like insoluble fiber, based mostly on the type of food. So it's not necessarily that accurate.
First off, that's not even food that would be digestible by a human. Secondly, reasonable people don't say all calories are equal, but that estimating TDEE + calories eaten is the best calculation to make for many people, in terms of accuracy vs effort required.
> that's not even food that would be digestible by a human
Well that's the point.
Obviously not all calories are equal. Nobody ever meant that literally. There are calories in diamonds, but you aren't likely to be able to digest them are you?
That's fine I'll explain for you. What happens when you burn a diamond? It releases energy exothermically. We can measure that energy in joules, or equivalently in calories, but it means exactly the same thing.
That doesn't mean they aren't in there, just that you don't get them out using your experiment.
Which... is the whole point. Not all calories are equally accessible to digestion. That's the point in the first place. Of course a calorie is not just a calorie for the purposes of digestion. We know that, because we can't digest, for example, diamonds.
People who say “a calorie is a calorie” clearly mean “calories from fats, carbs, and protein are interchangeable”, not “you can survive on a diet of diamonds”.