Shipping is cheap, also in terms of the energy (for example) required to ship too. There are social consequences to using real estate for farming, using artificial lighting and to producing the vegetable factory too.
I live in Australia. the costs of shipping fruit by road from Victoria to Queensland are indeed cheap. Especially when you don't factor road quality, driver rates of pay, loss of jobs in the Queensland agricultural sector. And look, we have tomatoes all year round: crappy ones, with good shelf life, because thats what you need when you ship them by freight truck 1500km to shave 10c per KG off the price, so you can undercut the local produce.
I also know cheap food fuels the economy. I think people have got a bit twisted on cheap. Good food should be cheap enough we can afford it, and expensive enough people can afford to grow it, and if you drive to rationalist economic scale answers too hard, you wind up with three farmers and thirty thousand un-employed ex agicultural workers. And, you wind up with acid-sulphate soil, contaminated water tables, monsanto owning the seed genome.
I'd rather we did some shipping and some local. I'm not particularly hung up on vertical farms, greenhouses are mostly ok with me.
The loss of farming land close to cities to make houses is part of the Queensland South East corner story. We're a giant conurbation, of prime river floodland, some of the best soil in the country. It should be growing Asparagus. Its growing blocks of flats instead.