It is now known that it's not as simple as "calories in - calories burned = weight gain or loss". The body burns more calories processing some kinds of foods compared to others. The body is less efficient or less encouraged to convert some kinds of excess calories into fat, depending on the source of the calories. It is becoming more clear that insulin plays an important role in a large percentage of cases of obesity, and it turns out most of the most cost effective foods encourage the body to produce the most insulin (and, almost paradoxically, also encourage hunger).
Your own example demonstrates my previous point. I would need to eat 18 (!) of those salads you suggested, every day, to merely maintain my weight. Or 5 Big Macs. It's obviously an extreme example, but which do you think poor people would choose? Buying cheap food can make the difference between paying the rent and living on the street.
With all due respect, it's ignorant and offensive to blame poor people for all their problems. Having an adequate amount of money makes an astonishing difference in your ability to achieve good nutrition, lower your stress, pursue advanced education, get enough exercise, etc.
I know it's popular to blame all poor obese people for their own predicament, but it's simply ignorant.