Cheap food causes obesity insofar that if you have money you can buy nutrient dense food that tastes good and spend zero time preparing it. With cheap food you're constantly expending willpower to eat food that tastes like crap, expending more time making it, or are sacrificing health value. Eating pots of unappetizing starches (which really aren't as healthy as you make them out to be relative to smart fast food picks) takes time and willpower. Those are actually limited resources. Attempting to do difficult unpleasant things one after another does actually wear you down and cause negative mental health effects which unravel your plans. A starch heavy diet means you're going to get rocked by insulin spikes regularly for your troubles. Whereas if you can afford to eat leafy greens and a big hunk of fish your mental stamina will increase.
In my mind the key to a healthy diet isn't buying potatoes and rice in bulk. It's $$$. FWIW my favorite poverty meal was chili... Good mix of time effiency/cost efficiency/taste.