Conventional farming requires massive amounts of land. This lets them go vertical and grow way more in the same square footage. I imagine that's where much of the profit potential lies.
They are also able to grow in an optimal environment (LEDs tuned to ideal wavelengths, precisely controlled temperature/humidity, etc) which should produce increased yields compared to regular field farming. They are also able to recycle 98% of their water.
If you can grow (and sell!) 10x the lettuce in the same area, it's easy to imagine that handily offsetting the energy & water costs they're incurring by growing indoors.