Calories in versus calories out doesn't account for the physiological and psychological effects associated with different kinds of foods. So yes, it is calories in calories out for weight gain, but no, it isn't that simple because mind and body respond differently to different foods.
Correct. I've been dieting recently. It's been meat, fish and vegies with some fruit and dairy. For example, when I cook my family bolognese with spaghetti, I just eat the sauce. I'm eating almost 2kg of food a day and getting under 2,000kCal. It's a bit of a chore, to be honest. It tastes good but there's a lot of chewing to do.
Bic Mac, fries and coke are 1,000kCal. I tell you, it'd be a
lot easier eating 2 Big Mac Meals than 2kg of meat and vegies is. Which means it'd also be easy to eat three of them - and get 3,000kCal daily.
And of course Mars bars, for example, are ~250kCal and just 53g. So that eight Mars bars would be my calories for the day; easier to eat 400g of chocolate than 2,000g of meat and vegies.
As food is more processed, it becomes higher calorie per unit of weight, and lower nutrition (vitamins and minerals). It's also usually softer. This makes it easier to chew and quicker to digest.
When asked why they choose junk food, fairly universally people mention first "convenience." It's easier to walk up to the counter and be eating within 2 minutes than to chop meat and vegies and cook them, and boil some pasta or rice, or whatever. And of course the stuff does taste alright, if not great. And the large amount of calories gives you a good feeling. If humans didn't have an ancient instinct to gorge themselves then we would have died on the East African savannah the first time it was six weeks instead of two weeks between gazelles.
It's true that it's not only poorer people eating shit food, but it is universally upon the poor that moral opprobrium falls. The middle-class person wasting
hundreds of thousands of dollars wags his finger at the lower-class person wasting
hundreds of dollars. Well, such is life. So my reflex is to defend the poor: they can't afford many pleasures, why not some junk food? They're not the ones driving SUVs with bumper stickers about climate change.
Good and cheap fresh food is not universally available in the West. Look up "food deserts" and similar ideas. We're very lucky where I live, lots of Asians who demand it, so we have a good greengrocer, butcher and fishmonger within 1km of us, and the supermarkets keep their prices down in response. Other areas just have supermarkets where everything is crappy and overpriced, and $5/kg vs $2/kg makes a huge difference to some people. Rural areas everything's trucked in and there's just one shop so prices get jacked up further.
As a general rule, if your solution starts with, "it's easy, all you do is -" then you are probably wrong.