It's not unusual for large companies to have a large web of corporate entities, but what's problematic is that they have different ownership rather than the same owners/owned by each other. (I started to say that one is public and others private, but it would be the same issue if two were public, as they would obviously not have the exact same set of owners.)
When xAI makes a deal with Tesla, if xAI is getting the better end of the stick, that is a self-dealing problem that the SEC can investigate on behalf of Tesla shareholders. The assets of Tesla belong proportionally to its owners, so Musk or another large owner can't make deals that give their private company an advantage at the expense of Tesla owners.
If Tesla gets too generous of a deal, that's something the non-Musk owners of xAI if any could raise an issue with, but when the public company is allegedly getting shortchanged, the SEC gets involved too. Moreover, even if you are trying to do it right, there is always the opportunity for someone to challenge you.