>>1521180Some areas have already cheap electricity costs and can do more to make it cheaper. It's not for the city core but industrial zoned areas that have available land unfit for residential or offices.
If you're asking why in the city and not on some open plot of farmland--it's money.
A vertical farm can bypass the food hub to get the product to restaurants and grocers faster. The airport and seaport would just be a small drive away. Less money can be spent on transportation costs.
The typical farm is out in the open exposed to unforgiving weather and animals. Having a farm in an enclosed area can rid the use of pesticides and provide year-round growth. Hydroponics can progress to where very little water can be used and where little to no soil is used. A large farm needs farm hands which is often fulfilled by undocumented or foreign labor. Being in the city provides better access to the labor pool and a less harsh work environment (no sun exposure) may entice more to consider the job. The farm also wouldn't have to provide lodging accommodations anymore because commuting has become more tolerable and accessible.
Of course this doesn't mean the typical farm will disappear. Those small family farms and meat farms will still exist but the big industrial entities may explore vertical farming.