Fresh fruits and vegetables are more expensive to grow than the crops that will be processed. Products rely on human labor rather than machines, and machines are more efficient and cheaper in the long run. However, the U.S. government also doesn't subsidize leafy vegetable crops in the same way it supports wheat, soy and corn, vital ingredients in a lot of junk food.
The hypothesis that “bread makes you fat” has to do with the impact of a high-carbohydrate diet on the human body in an environment where food is available everywhere, not in a world in which the poor are periodically on the brink of starvation and cause a revolt over bread. This just means that, while a malnourished person needs to increase their food budget (and there is a clear tendency in countries to see fewer malnourished children when they get richer), as for the main dietary problem in the United States, I am skeptical that that cost is the key barrier. And in this case, you'd expect to see that less processed foods are cheaper because someone gets paid to process them. So instead of focusing solely on calories, it's more important to focus on nutrient-rich foods that fill us up with fewer calories.
To address this question, HSPH researchers conducted a meta-analysis of 27 existing studies in 10 high-income countries that included data on individual food prices and healthier foods. The finding is based on the most comprehensive examination conducted to date in which the prices of healthy foods and dietary patterns are compared with processed foods that tend to have much more calories at a lower price; that is more cost-effective than fresh food if you have a limited budget. Given this reality, they said that creating a similar infrastructure to support the production of healthier foods could help increase the availability and lower the prices of healthier diets. Some aspects of this have been costly (more on this another time), but switching to food consumption habits that are consistent with weight loss hasn't been.
However, there is a fairly broad consensus that it's better to eat minimally processed foods rather than highly processed foods. The researchers suggested that unhealthy diets could cost less because food policies have focused on the production of “cheap, high-volume commodities”, which has led to “a complex network of agriculture, storage, transportation, processing, manufacturing and marketing capacities that favor the sale of highly processed food products to obtain maximum benefits from the industry.” I went to look for examples on Amazon, both because Amazon sells everything and because the fresh foods listed on Amazon are from Whole Foods, which are sadly expensive.