I read a paper a few years ago that basically said that food insecurity is not a problem with production, but is instead a problem with distribution. The USA throws away enough food to feed another good sized country. I don't know the exact nature of the distribution problem and whether it's a problem of resources or something else, like s political problem.
Sure it makes sense. You got some dairy making way too much milk, how are you going to get it around the world? The fuel spent is worth a lot more than you would get for selling it. Plus it has to be kept cold. That's why all the cheap food we eat is made pretty close by and if you are getting something imported chances are it costs more. And that doesn't even get into what if the place is unstable which would add more costs.
The shit thing is the very people who need food the most are the ones who can't afford it.
So yeah the food is there but getting it where it needs to be is the tricky part.
The biggest issue involves the logistics on the ground, and in places with extremely high food insecurity, there tends to be little to no legitimate government, and so getting anything done involves dealing with local gangs and warlords. It doesn't matter how much money you have if every shipment you send will just be stolen at gunpoint and sold to fund the local thug's next golden toilet. This is not a problem that can really be solved by throwing money at it.
The distribution problem in 100% of famines is that some government somewhere cracks down on the free transfer of food. They either physically stop food from moving, or they provide huge financial incentives for moving food outside the famine area.