Weather
Farm products are heavily dependent on factors like weather. Good weather and there is a bumper crop. Bad weather and there is a shortage. Farm subsidies help make sure that there isn't a shortage and help manage bumper crops by buying the excess.
My grandfather, who grew up on a farm, had a dim view of farm subsidies. What he remembered was that they grew their own food in the days before subsidies. However, with the subsidies, many farmers don't do that. Why? Crops for personal use aren't subsidized, but crops for sale are. So to maximize the subsidy, farmers grow only crops for sale. But this then makes it harder to weather a bad or great crop (great crops drive down prices when widespread). Because if you only have one crop, you need to sell it to buy other foods and maintain proper nutrition. If you grow many things, you can eat or store what you need and sell the rest. At least you won't go hungry.
My great-grandfather used farm subsidies as a retirement program. The subsidies provided income for leaving his fields fallow. Without them, he would have probably rented his fields out to someone else or gotten help from other family members. So his son, my grandfather, still thought that it was a bad idea.
Anyway, it may not be true, but one of the excuses for continuing the subsidy program is that it helps farmers manage random occurrences like weather.