As you say the cost of food is usually the main issue when it comes to importing food. The question is whether or not it is cheaper to pay for infrastructure and grow food in country, or neglect infrastructure and import most of the food.
Of course even if importing ends up being the cheaper option what happens in times of emergency or changes in the political landscape. What if relations with food importers sour and they refuse to sell us food, are you going to suddenly restart the agriculture industry that was killed off and rebuild all that infrastructure? What about natural disasters where you need to have the transportation capacity and throughput to flood an area with supplies on very short notice?