Thranax is correct. Larger farms tend to get money from the government versus your local farmer who, more likely than not, has invested their own money into the farm.
When you buy local, you keep your local economy flowing. The money you spend doesn't go elsewhere in the country, which in turn, keeps your city monetarily healthy. So in essence, you will get your money back.
Similarly, when we get various produce overseas (such as bananas), we are essentially, stimulating the economy of another country and taking money out of our own pockets.