Maybe we could get people into vats and hooked up to the data centres so the AI can use our brains for extra compute resource? But maybe that would be difficult for people to understand so we can gloss over it and just say they're there as batteries? But then why then block out the sun, the free source of energy? Meh, most people won't question that plot hole - lets go with the batteries thing.
Oh wait, this isn't a Matrix sub?