Food spoils very quickly, so mostly if you don’t consume it locally you need to quickly export which is quite expensive. Very often it’s simply cheaper to utilize it for example as fertilizer.
Storing food is costly.
The best option would be not to produce an excess of food but 1) demand is hard to predict 2) crops output is hard to predict 3) for legal reasons like contractual obligations it’s better to produce more than less.
The reasons behind it are quite simple: