It's a fact that African countries on average have a much lower obesity rate than European countries. If you don't believe food quality and quantity have anything to do with it, I'd love to hear your explanation.
Last I checked, the average British diet is around 60% upfs. In a country like Italy it's around 20%. Upfs are purposefully designed to be compulsive, making you want to eat more without actually feeling properly full for very long.
Then food habits like eating snacks all the time, drinking empty calorie drinks, cultural habits like starting the day with sugary cereal etc also play a role in health and weight outcomes.
Obesity is so very obviously linked to food that I don't understand how anyone can argue otherwise. It's like saying building muscle isn't linked to exercise.
Just think of the extreme cases e.g. the Scottish man who fasted for 382 days. So he didn't eat for 382 days and, surprise suprise, he lost weight, going from 207kg to 82kg. (en.wikipedia.org/wiki/Angus_Barbieri%27s_fast).
Not that I think everyone should rush out and follow his example, but it does make crystal clear that no/less food = weight loss.