I dont think Ive looked at this in detail, but calorie for calorie, I think junk food is cheaper
So despite all the worries about obesity, you do still need to eat fats, carbs and proteins in some proportions
So a snack of an apple is fine, if you only need that snack to be 60 cals and no protein and no fat
But if you need fat and protein in it, then it becomes harder to do for the price of an apple
Eggs, cheese, milk, fairly pricey compared to cheap crap
Meat and fish, pricey compared to cheap crap
Lentils, beans and legumes, not so pricey but also needing fats to boost them up in terms of nutrition (all being balanced out) and they need time to cook and a myriad of other ingredients with them to make them taste nice and attractive to eat
This is why someone reaches for the pizza and frozen burgers