I work in hydroponics and when I describe it to someone new I mention it's like creating 15 acres of agricultural land out of thin air. Of course that depends on the crop, but there can be huge advantages to covered agriculture.
I know, right? And if you've got farmland you can't easily put plants on you can put animals on that instead, and eat the animals and use the stuff the animals leave behind to grow plants.
It's almost like an ecosystem that has worked for hundreds of thousands of years is actually a pretty solid idea.
Modern hydroponics are certainly not perpetual motion machines. The difference is that you can collect all of the unused nutrients below the plant and recycle them back into the input stream. Secondly, you can elevate the carbon dioxide levels because it's an enclosed system and encourage plants to grow faster. Finally, the enclosed nature more easily permits integrated pest management, which reduces total pesticide requirements...of course, herbicides are not required at all because of the way hydroponics grow.
It's not perfect, but it's exceptionally more productive than field agriculture.
All depends on the cost of the land it's on, electricity/water costs, the growing apparatus, whether it requires artificial light, and what the market rates for the crop are. So yeah, there's a lot of variables as one could imagine.