My 2c is that one should simply look at the diet of lifestyle of the fat people they know, and the obesity problem will become clear.
Tons of soda. Products like Hamburger Helper instead of actually making pasta and sausage yourself. Extremely high volume of food in general. Constant, constant snacking. No exercise. So a massive amount of low quality food and nothing to burn it. Cancer, heart disease, joint pain, diabetes, heartburn, everything else.
Occasionally you run into some outré example like a family I know who eats exclusively home-cooked meals with grass-fed beef and venison yet are all overweight, but I've had lunch with them and that was some of the richest, tastiest food in my life plus all the trimmings. Also, they don't really care about exercising, or for that matter their weight.
I don't think this is complicated. Weight gain is simply calories in and calories out. The only contentious part is the psychological compulsions that cause people to eat amounts of food that they know are bad for them, sometimes while maintaining a sedentary lifestyle, which they also know is bad for them.
It's not as straightforward as that, yes there will be differences in whether that 10k comes from junk food or unprocessed, but not everyone actually manages to take in that full value for a lot of different reasons. As mentioned in another comment by u/TheOutlaw hormones such as insulin will affect the actual energy intake from a food source, [run an experiment giving 1000 people the same meal and see what happens when you have diabetics in the test group]. Racial demographics are also going to play into things like with widespread dairy allergies in some populations that would mean giving 10k energy to some via dairy products will generally work fine while in others you're going to end up clogging the plumbing with the fallout.
The simplest point is always going to come down to energy in vs energy out, but even that isn't as simple as it might appear at first.
10k calories a day is such a gobsmackingly large portion that it'll make anyone in the world obese unless they're training like Michael Phelps or Brian Shaw. And if you're one of those people then you very much know it.