A quick search still shows the original measurement was done off of a bomb calorimitor. And now instead of that, they measure amount of a specific part, and assume a calorie amount of fat, protien, carbs, and alcohol, and those numbers came from a bomb calorimitor. So the numbers are still from how much energy you get when you burn someting. Unless you can find an example of how it's done now.
And the corn example is spot on, since the corn is essentially digested before into a form that can be used by a car. Much like digesting food so that you can use the food energy from that. Just like digestion and metabolism. How that relates to a body? Well, the amount of "digestion" of oil can be reduced to distillation/separation- and you get gasoline from crude- it takes little energy out of the oil to separate it into useful forms. Making a useful version from corn takes more potential energy out. See that as sugar vs. corn for the human body.
Like I said, I'd like to learn more about real digestion, if a simple calorie in- calorie out works for you, awesome. But IMHO, there's a lot more to the story, how it works, and how foods interact with each other as you digest and consume. Especially since the #1 item added to the diet, more than any other by a wide margin in the last century, is sugar.
We had grains, protien, animal fat, vegtable fat, alcohol, but sugar was a pretty rare item on the diet up the the last century. Then it was added in spades.
But we go after fat, since it's energy dense, more than sugar.