Junk food is convenient and more enjoyable, at least in the moment of eating. In the last 60 years there have been changes to the environment that reduce physical activity (more automobiles, less walking, less strenuous physical labor on the job) but I think that the most relevant change is the abundance of
highly palatable calories. 60 years ago we largely didn't have "convenience foods" and the fastest snack you could make yourself (like a cold sandwich or a piece of fruit) didn't have the "craveability" of Doritos or microwaveable egg rolls. Back then the average American could
afford to buy far more calories than needed, but those calories would take prep labor and/or not be highly palatable, so in practice many fewer Americans overate buttered popcorn the way that people overeat Doritos today.
America was on-average wealthier than most of the world and an early adopter of highly palatable convenience foods, so its obesity problem came on earlier. Global obesity rates are rising as more people globally can afford microwave ovens, frozen pizzas, drive-through restaurants serving french fries, and other such aids for high speed ingestion of delicious, calorie-dense foods.
Most people who need to lose weight cannot willfully maintain diet alterations in the long term. They go back to old habits. For 99.9% of human existence starvation was a much more common health threat than obesity and we're just not "wired" to experience excess food intake as a threat. The GLP-1 drugs like semaglutide reduce the desire to overeat, regardless of how palatable the food is, so people who could not lose weight before are able to eat less without having to consciously suppress desire every day.