You can question whether there is metabolic advantage to consumption of certain types of food
Yes, this is a much better question. Our bodies do not seek energy, but the substances that are required for our biological processes.
were warm blooded creatures
Yes, our body temperature is regulated by our biological processes and at the same time the converse is also true. It's much more complex than doing 'work'. That would again be an oversimplification. Thinking of the body as a thermodynamic system like a bomb calorimeter is silly.
What is the error margin when measuring food? To save you the trouble, it's about 20-25%. Unless we compensate by considerably under-consuming the amount of food we eat, the sheer amount of noise alone caused by this error margin makes it meaningless.