You are going to be utterly shocked when you realize that solar panels work on the ground, too. You can buy so many batteries, and so many geographically separated locations for your panels, for the price of launching a datacenter into space.
Solar panels are much more efficient in space (no atmosphere).
Before downvoting, would you mind quoting the relative cost of batteries vs. solar panels for a 150kW solar-powered satellite?
Batteries are expensive.
Marginal cost of launches keep coming down for SpaceX with reusable rockets and lifetime of satellites is long.