I think there are two different things you are asking about.
The first is the standard enthalpy of combustion, which is indeed measured more or less as you describe. There's absolutely no problem with that, because the total energy released by the metabolism of glucose to CO2 is exactly the same as released by combustion. On the way down the energy slope you might even use some of it to make ATP and actually do some "work". There might be some small corrections needed (you run at 37C and not at 25C for example) but no matter which way you take, turning glucose and oxygen in carbon dioxide and water will release the same amount of energy. And remember, we need a lot of this energy just to keep warm, so the waste heat in metabolism is not really a waste.
The second part is a bit more complex, when you're talking about food. Here the bomb calorimeter part is a bit misplaced, because most foodstuffs will be analyzed using other techniques to determine the amount of carbohydrate, fat and protein. Then they'll do a calculation to get the number of calories in your food. This should get you quite close to the real number of calories, as stuff that's not digestable by humans is not counted. Regarding the salad bacteria: I'm not sure if they put it on the labels, but we know whether or not certain fibers will be metabolized, and you could take those into account as well if you wanted. It wouldn't make much of a difference though, almost all of the fiber we consume is coming out the other end.
If you want to know more, you're getting into a swamp of definitions and standards. For example you could skim this FAO report:
http://www.fao.org/docrep/006/y5022e/y5022e03.htm#TopOfPage (chapter 2 METHODS OF FOOD ANALYSIS)
http://www.fao.org/docrep/006/y5022e/y5022e04.htm#TopOfPage (chapter 3 CALCULATION OF THE ENERGY CONTENT OF FOODS - ENERGY CONVERSION FACTORS)
This shows that people are working hard on the problem you're posing, using a wide variety of approaches. It shows that every method has its problems, but also that all the values are quite close to eachother.