The subsidies are generally to have spare production capacity, so as to reduce the risk of famine that can occur from the capitalistic incentives of optimising the system for efficiency above resilience.
(Not that the subsidies are always actually the most sensibly set out: but the general idea of subsidizing farming is an important one)