Not a very good one, that's just how we say it :)
I guess you could argue that a "farm" is mostly a 2-dimensional piece of land, and that "in" is only used for enclosed spaces. But that argument doesn't always hold, and it's rather subjective too.
This amounts to an English phrase, not a sentence; e.g., ...the animals cooked on the farm, are good to eat. "...cooked on the farm..." is a descriptive adjective.