Because we don't know why. We have many suspects, but no concrete evidence for any of those, and in many cases, not even clear mitigations. (Let's pretend for a moment it's e.g. all about PFAS, what do you actually do about them? And what do you do once there's the inevitable political outcry that it's just spoilsports from the other side trying to ruin your life?)
And so we medicate, because that's the only thing where people can say "my neighbor did it, and look, it worked for them, I'll do it too".
We know exactly why; the average American dietary caloric intake has increased to three thousand and something, which is more than the average person burns, especially if the person is as sedentary as the average American. More calories eaten + less exercise = more weight gained.
This is the technically correct answer and we should try to address it from both ends - eating fewer calories AND being more active. There are a number of issues with "just eat less" because there are reasons people eat more than they should. Part of that is what they eat (what you eat matters for multiple reasons) and also habits or other psychological reasons.
Yes, Most people don't know why. But nutritional researchers like Micheal Gregor (he and his team have read over 20,000 research papers! just for one book - how not to die) know why. The problem is all the people who get the most views on youtube, TV and social media are the people who are best at operating businesses and SEO. they often don't know all the research (and even give bad advice sometimes) and hence we get all this back and forth that we see all over the place. Meanwhile, the real researchers who know what they're talking about and are very knowledgable about nutrition and health don't have time for SEO and running a successful media empire. they're content doesn't get viewed very much.
This approach isn't working, has demonstrably failed. Do you actually care about fixing any problems or just happy to shame people you see as less than you?
Diesel fuel technically has several times as much calories as Cola-Cola. But try drinking diesel fuel for lunch and see what comes about.
This is because the human body doesn't literally burn food like in a calorimeter. Digestion is a very complex chemical reaction with lots of nuance and different nutrient pathways.
...Are you habitually chugging diesel fuel for lunch?
But to address your point: It seems like a disingenious and pedantic argument.
Can you come up with edge cases where my one-liner (Calories In - Calories Out) is not 100% accurate? Yes. Is that the case for the absolutely overwhelming majority of people? No. Over 70% of people in the US are overweight or obese. That's more than 2 in 3. Are we all suffering from some exotic, unknown, mysterious disturbance of the gut microbiome? Or is it more likely that we just move too little while eating too much? I think I know the answer.
And so we medicate, because that's the only thing where people can say "my neighbor did it, and look, it worked for them, I'll do it too".