Yes, giving money to farmers has the characteristics of a public good. What’s a public good? Economists have a very specific definition of a public good, a definition that even public libraries and public schools don’t meet. Here it is: a public good is not diminished when consumed (“non-rival”), and it’s always available to everyone (“non-excludable”). Since a library and a school can be locked (excludable) they aren’t public goods (although the ideas inside of them are).
What about giving money to farmers? People value farmers. And they value the idea of farmers. In fact, last year Farm Aid received over $1 million in contributions. The satisfaction people receive from giving to farmers is a public good. My enjoyment of that satisfaction doesn’t diminish your enjoyment, and it’s available to everyone, all of the time.
Why does it matter? The best government policies enhance equality, efficiency, or both. Public goods are notoriously under provided–why should I pay for my fireworks display when I can sit back and enjoy yours? So by transferring money to farmers, the government increases social efficiency.
I know, kinda blows your mind, doesn’t it? And that says nothing about the public goods associated with agriculture.