There probably is a lot less farmland for sale and the carrying costs are a lot higher for a working farm unless you plan to just let it go back to nature (which devalues it, just like bad renters do a house).
In my neck of rural farm country, I have yet to see a farm change hands to a non farm entity or even a mega farm corporation. I know of two aging farmers who having no family successors have handpicked young local men to replace them on very favorable terms and a third who sold hers to the neighboring farmer with a life interest and stipend arrangement. She passed away this winter at 80, but raised a few lambs and bummer calves right up till the end living in the farmhouse she was born in.
I think the investment firms buy houses because that’s what’s available.