imo the idea of "How could the free market prevent this" is a misunderstood approach
you can fix it, you can tell your loved ones and close friend to fix it
the "market" is nothing but the addition of all the decision each human does, not a being in and on itself.
we can argue a lot on how the gvm might fix it or had caused this, which they have a lot of influence over sadly due to the fact that a lot of ppl blindly listen to them + they can influence a lot of decision by tax and regulation.
but at the end WE have the control over our lives.
you can chose different food even if the gvm tells you it's bad, cause you are free
you can move to another state where taxes are diffrent
or even another country
trying to blame or hope for "the market" or the "government" to solve it all won't solve you anything.
it's much easier than one might have been made to believe by our education system.
on another topic, the long answer as to how in hell did the health / food / education system reached this point I recommend:
"Fiat Food: Why Inflation Destroyed Our Health" by Matthew Lysiak
or if you prefer videos he has made some interviews
he did a lot of research into the chain of events leading to this point in time and how the additive pressure of:
short time solutions + religion bias + lobby by food industry + trying to cover it all up = here we are now