My view of what has happened is this: technologies and ingredients were invented by food manufacturers over the past half century. Foods manufactured using these technologies have the following advantages: cheap, high mouth appeal, non-perishable, convenient. They also have the following disadvantages: calorie dense, difficult to metabolize, addictive for some people.
For most peopele not explicitly making food decisions with a mind to control their weight, the advantages outweigh the disadvantages.
At the same time as this was happening, most of the reasons for people to expend calories vanished. As far as I can think of, the only reasons left to burn calories are pleasure and weight control.
In this sort of context most normal, perfectly rational people will end up getting fat. The only people who won't are: athletes, people with strong metabolism (this usually goes away with age), and people who dedicate themselves to not being fat.