You don't know what sort of revenue xAI has because it's not public. Starship is the largest, highest capacity reusable rocket in history, something which no government or company has even attempted. Predictably of course it will take time to get it right. Do you know how many Rockets the US blew up before it got things working?
Most, if not all SpaceX launches are likely profitable, as they are now putting up most of the world's payloads. Starlink is now profitable as well. It's unlikely they are losing money outside of Starship, but that's how companies work, they invest in the future.
Tesla hasn't been hurt nearly as much as you think. They still have the #1 and #2 best selling cars in Euro pe. https://cleantechnica.com/2025/08/02/europe-ev-sales-report-...
Tesla is a particularly tragic story. The vertical integration they had to do because of unavailability of suitable suppliers and car industry corruption and supply chain cartels is an under-appreciated success. Throwing that and all the other goodwill away by going mask off fascist is an amazing act of brand destruction.