There's 4 factors that drive a person's weight in this order of importance:
1) Genetics
2) Hormones (Insulin, Estrogen, Testosterone, etc)
3) Calories In (Food you consume)
4) Calories Out (Exercise, ATP>ADP cycle, etc)
Why is it important we understand these? Because first it lets you know that it is very hard to out-exercise a bad diet. Second it brings an understanding of some people having it harder than others due to their genetic profile so you can sympathize and not trivialize their struggles. Third it makes you understand that it's not just the calories in/out, but it's the type of food that is changing your hormone dynamic in your body that changes how that food is processed and energy stored.
So with this, for someone losing weight, put them into consideration and it should help a full picture instead of awful advice like "just eat less and work out more". What helped me in my weight loss and muscle gain goals was an understanding of all of those dynamics, accommodating for my genetic profile, eating the right kind of food to influence my hormones, keeping my calories in with my weight loss or muscle gain goals, and not just throwing in random "exercise more" but targeting muscle gain to increase my ATP>ADP cycle to go along with my endurance cardio.
EDIT - And the major reason for this shift is not that we are just eating more calories as a society but it's the type of food. Subsidizes around farm products leading to bad canola oil, soybean oil, etc in the western diet has been awful for us and changing our hormone dynamic, how omega-6 and omega-3 fats are managed, etc. One of the big deals about the Mediterranean diet is that it's mainly olive oil based. We really need to get better understanding of the foods we're eating, not just the label on the back around calories. And that's tough to do. It's a lot of research among a lot of disinformation due to monetary interests.
Then there's even the study of "gut biome" dynamics between people and how they develop based on the type of food you eat, and the fermentation of that food within your intenstines, that may fit somewhere in between 2 and 3 above there.
There's a lot in play here, and it's important that people spend time researching and trying to improve the quality of food they eat (which is expensive for a lot of people making minimum wage) and combination of that food.