When we consume more energy than we expend, we gain weight.
For most of human history the odds were heavily stacked against us being able to consume more than we burned off. So the human body adapted to store the excess - for the days when food was not available.
For our unfortunate ancestors, food, especially high energy food, was generally scarce, took lots of energy and risk to hunt down, had to be shared widely across the tribe, or would go off in a couple of days.
It made sense to gorge as much as possible when food was available. Those bodies that could accommodate the additional energy had better survival rates during the inevitable shortages that followed. In addition to this, appetites and stomachs adjusted to accommodate larger meals when available, thereby increasing the odds of survival.
In more recent human society, aided by labour saving devices, the battle for survival has tipped in our favour; the energy flow equation now easily being sustainably positive for large numbers of people - especially in the west.
However, the human body has a very long primal memory and remains as adapted as ever for those periods of food shortage, except in most cases these no longer happen!
Appetites expand with waistlines and when attempting to adjust to reduced flows we feel hungry or counter intuitively think: "just this time will be OK to indulge again".