Just a neat bit of financial engineering. You can tell because Elon picked SpaceX instead of Tesla – which would have actually made sense at some level (Optimus Robots + AI). But Tesla is public and so he'd need to follow laws and reporting requirements.
This is fairly naive, Elon isn't the only investor in SpaceX.
My guess is "that they did the math" and had an engineering study which convinced them that getting AI datacenters into space will make sense.
It's also not hard to imagine why, the process alone once perfected could be reused for asteroid mining for example, then mirogravity manufacturing, either of which alone would be enormous capital intensive projects. Even if AI dataenters in space are break-even it would be a massive win for SpaceX and leave their competition far behind.
does he need spacex/xai to prop up tesla or the other way around?
You can tell it's just financial engineering because in the entire press release xAI is only mentioned in the first two sentences. Everything after that is Elon talking about space data centers to distract from the actual topic. Which seems to be working