
The demand for farmer's markets comes from people who want to consume the food that can be purchased there, but it also comes from the desire to attend an enjoyable open air market, to interact with the people responsible for growing the food, to be able to select the best possible quality and to support local agriculture.
On the supply side, the cost of providing produce to a farmer's market can be higher because of a lack of effectively taking advantage of scale efficiencies, cost of time and transport to attend the market and the extra cost of selecting the highest quality from among your crops.
Put these two together and there is little mystery why farmer's market prices are higher in equilibrium than in a supermarket, and nothing sinister either: What we pay for as consumers is a lot more than just a commodity.