Wrong. They made $874 million in profits out of which $543 went into stock based compensation, a non-cash expense. This happened because Musk became eligible for two tranches of compensation based on market cap + profitability.
> meaning their core business still loses money
Wrong. Even a cursory look at their earnings report would have told you so. They made 23% gross margin on automotive revenue excluding credits. How is making 23% gross margin "losing money"? The typical automaker makes single digit gross margins on their products.
And they did all this while building out factories on three continents.