In an attempt to answer that question, Elizabeth Kolbert reviews a gaggle of books in this week’s New Yorker. (This is only part of the answer.)
According to what’s known as the Expensive Tissue Hypothesis, early humans compensated for the energy used in their heads by cutting back on the energy used in their guts; as man’s cranium grew, his digestive tract shrank. This forced him to obtain more energy-dense foods than his fellow-primates were subsisting on, which put a premium on adding further brain power. The result of this self-reinforcing process was a strong taste for foods that are high in calories and easy to digest; just as it is natural for gorillas to love leaves, it is natural for people to love funnel cakes.
Kolbert’s article is a good overview of the current popular views on obesity. Related: Scientists Discover Gene Responsible For Eating Whole Goddamn Bag Of Chips.