Free markets are great, for price discovery.
Thats about it.
Now, that goes a very long way in many many aspects of life, but not all of them.
The insistence on using markets as the only tool to determine everything is just as mistaken as throwing out free markets as a useful tool because it’s used in places it never should be.
The two main theorems of welfare economics show why free markets are great: a market equilibrium is pareto-optimal and vice versa.
The problem is that the conditions under which these theorems holds are completely unrealistic: perfect competition (which is predicated on decreasing economies of scale), so no monopolies, perfect information, no externalities, no public goods, etc.
Given that, it is imperative to regulate markets, and provide some goods through the public sector.