/u/The_D20_is_cast has it for the first part of your question. Caloric bombs are also known as bomb calorimeters if you want more info. As for how we know its accurate, its because the FDA (or equivalent food regulatory agency in other countries) requires it to be accurate, and companies can be fined for presenting incorrect nutritional information.
In the US and most developed countries, the FDA (or equivalent agency) sets protocols and standards for measuring the nutrition content of food.
Since these standards are well known, anyone with the expertise and resources can repeat these tests to verify, and if the producer is lying, they would face both public backlash and government sanctions.
Latest Answers