From both biological plausibility and observational evidence one can conclude that Western-style diets are prone to cause obesity due to having an unnaturally high energy density. A problem within the field of nutrition is that biologically unnaturally high energy density diets have become the norm in the civilized world. People who eat a natural diet with a biologically normal energy density can be found in indigenous populations who are isolated from modern civilization, the vast majority of the people in the civilized world don't eat that way. Almost all research on the relation between diet and health involves the diets the people in the civilized world eat.
The gap between these sort of high energy density diet most people in the civilized world eat and a biologically natural low energy density diet is so large that the data of people participating in studies who do eat the latter type of diet would be filtered out as "implausible outliers". E.g. many studies use a limit of 1 kg of a single food item as an upper limit. But if you eat 1000 Kcal worth of potatoes you do need to eat 1.3 kg worth of potatoes. That may sound like an impossibly large amount of potatoes to eat, but I (a small guy weighing just 53 kg) regularly eat that amount of potatoes for dinner without problems. Eating large volumes of food is the only way you can get enough calories in the natural world where high energy density foods like cooking oils, butter, cheese etc. don't grow from the trees.
While it seems plausible that only total caloric intake and energy expended due to exercise should be relevant for obesity, we can easily see that there is a problem with biological plausibility here. Consider a group of animals who have a stable body weight who due to some environmental perturbation suddenly need to expend more energy to get their food and the amount of food they get is also a bit less than they used to be getting. If body weight were to be a delicate fine-tuned balance between energy intake and energy expended as a result of exercise, they would starve to death. Even a small imbalance of just 100 Kcal a day less energy intake compared to what's expended would cause a weight loss of 40 kg in 5.5 years.
This calculus must thus be wrong, obviously the fault lies with ignoring feedbacks on the metabolism. As the animal loses weight, it will expend less energy in moving around, but there are also more direct feedback effects. As the fat cells become emptier, they produce different hormones compared to when they were full, and this impacts appetite and it modulates metabolism. A lot is still unknown about such feedbacks on the metabolism, but it's implausible that mammals who burn energy at a fast rate would not modulate their metabolism as a response to their energy reserves, especially at rest when it would affect physical performance the least.
Such feedback mechanisms then keep the body weight stable under natural conditions, they don't only prevent the animal starving to death due to trivial reasons, it also works the other way and and prevent the animal from gaining weight due to eating a bit more on the long term. Weight gain and becoming physically unfit as a consequence is also very dangerous to animals living the wild.
The reason why we are prone to getting obese must then have something to do with our unnatural diet, rather than the energy balance between exercise and calorie intake, unless this energy balance is out of wack much more than what the natural feedback mechanisms can compensate for. The latter cases do occur, our very high energy density foods make it easy to stuff our stomachs with thousands of Kcal worth of food more than would normally fit in there. But most people who complain about gaining weight and try all sorts of diets to lose weight, don't fall into this category.
The typical people who struggle with their weight are people who eat a normal amount of calories, say between 2000 and 2500 Kcal a day, they stop eating before they're full, they feel hungry during the day and try to tolerate that as best as they can not doing that would lead to them gaining weight. So, their problem is that their weight is by far not as stable as that of animals in the wild. The high energy density of the diet plays a direct role on a perception of fullness after a meal but this alone doesn't explain why they need to fine tune the calorie intake to prevent weight gain.
Another relevant property of high energy density foods is that they have a low nutrient density. While we make sure that we do get all the essential vitamins and minerals, we can't be sure whether we get enough to prevent problems that are not acute medical problems, such as the risk of getting obese. One very important component of the diet is fiber. A natural low energy density diet will contain 80 grams of more of fiber per 2500 Kcal. The RDA which takes a high energy density diet where you would get a substantial part of your calories from refined oils as the norm, is 40 grams a day. But most people get only half of that, about 20 grams a day.
What could plausibly go wrong of we eat less than a quarter of the natural amount of fiber our body has evolved to eat? Fibers are food for the intestinal microbes, the lack of fiber has been linked to obesity. The mechanisms proposed in he literature are i.m.o. too simplistic as they appeal to arguments that would bring back the calorie intake finite tuning problem. I.m.o., getting the required amount of fiber allows the body to have a microbiome that it can more easily control to help keep the body weight stable.
As I explained above a stable body weight without having to count calories or count the number of steps you take per day, is essential for long term survival. Mechanisms that keep the body weight stable must thus have evolved. Evolution doesn't care about how exactly such mechanisms are implemented, whether it's purely internally regulated via hormones or via the microbiome with microbes eating more of your food if you eat more. What matters is whether all mechanisms together produce the desired result in a robust way.
The fundamental cause of obesity thus has nothing to do with calorie intake. In fact, putting the blame on calorie intake has led people to reduce portion size which causes people to stick to the extremely unhealthy high energy density diets that cause obesity. To get out of the obesity epidemic we need get the entire population to get gradually used to eating far larger volumes of healthy low energy density foods.