I met my new host family in San Jose at a farmer's market and helped them sell pineapple. Not only did I get to know the little yellow fellow quite well, I also had a chance to ponder the economics of farmer's markets.
Why do farmer's markets exist? If farmers specialize in farming, and stores specialize in selling, why would farmers try to do what stores do best? By selling retail instead of wholesale, farmers trade the certainty of contracts for risk, and loose the efficiency of transporting produce in large, refrigerated trucks.
Transporting produce in small trucks and selling it in a small stand requires more man-hours than using large trucks and large stores. Is the farmer's time just worth less than the professional driver's or clerk's? Do the farmer's markets exist only because farmers don't have access to jobs in the more productive full-time retail sector?
Or is it a transaction costs story? Farmer's markets are an example of vertical integration; by selling their produce directly, no resources are wasted in negotiations between farmers and retailers.
Farmer's markets also have a few advantages over traditional stores. Because the owner and the clerk are the same, prices can change quickly (not all markets are this efficient). If a farmer isn't selling enough, he can instantly lower the price. He has the freedom to bargain and price discriminate. Farmer's markets also offer a novel experience to consumers--from the colors and smells of the market to the chance to meet farmers and learn more about the products. And farmers have side benefits, too--instead of a professional truck driver hauling everything to the market, farmers can take advantage of travelling to buy products available only in the capital and visit relatives who live on the route.
Here in pineapple territory, a large pineapple is worth about 40 cents. In a grocery store in the capital it might cost $1.40, and in the farmer's market $1.00 (or, by the end of the day, $.80, $.60...)