This is why I used this example because you've just demonstrated that you don't know what socialism is. There is a myth that capitalism is "free markets". First, there's no such thing as a free market. All markets require regulation to function. Second, markets exist in every organization of the economy and existed long before capitalism existed. We have records of such from Sumeria from 4000+ years ago. In late feudalism, serfs would sell the food they grew to pay their fedual landlord, an early from of taxation.
> Also, farmers markets (today, in the West) are basically luxuries for wealthy people.
Walmart is one of the most heavily subsidized businesses on Earth. Directly you have agricultural subsidies but another is food stamps paid to Walmart employees [1] as well as Medicaid. Why? Because Walmart pays below a living wage.
Also, Walmart is known for setting up in a town, selling their products at below cost to kill all local businesses and then jacking up the prices, if not leaving outright, creating a new food desert.
As for locally grown food being expensive, that's not really true once you look at the bigger picture. We've seen this pattern play out in every country the IMF and Wolrd Bank have gotten involved in. The IMF/WB place conditions such that local farmers can no longer produce crops to feed their populations. Those they have to buy from the West. Instead, farmers have to grow export crops to earn foreign currency to service debt.
In the short term this lowers food prices but forces all the farmers off their land. They then have to move to cities to seek work and/or become a drain on the state.
Inevitably, with and without manipulation, the local currency collapses and locals can no longer afford that foreign food. It's entirely predatory. A system was destroyed for foreign bankers. This is almost exactly what happened in Haiti and Somalia, to name just two examples.
Now if the community owned that supermarket, this predation just wouldn't happen. In other words, it's the worker's relationship to the means of production.
[1]: https://www.worldhunger.org/report-walmart-workers-cost-taxp...