Most developing countries are far less productive in agriculture than in the non-agriculture sector compared to the rest of the world. Standard Ricardian trade theory predicts that developing countries should be large importers of food and should have few workers in agriculture. The data is in stark contrast to this prediction. In this paper, we explore deviations from from standard trade theory --- with economic and empirical content --- to quantitatively explain this apparent deviation from comparative advantage. In particular, we focus on the role of internal trade costs and curvature in the production possibility frontier, both of which increase the incentives for workers in developing countries to produce their own food.