Depends on variables
Junk food is often cheeper because it is mass produced, filled with preservatives & can stay in a usable form for extended periods.
It may also be refined from lesser quality food sources that would not sell in the market. Compare this to fruits and vegatables with a limited shelf life & transport costs that must speed the product to market. Grow your own or shop smart and you can cut costs.