Profits are not fungible. Companies can, and do, determine profit and loss separately for each line of business, because it matters both for financial reporting purposes and for tax purposes. Even Tesla acknowledges that it is not profitably making and selling cars under GAAP (i.e., under industry-standard accounting); their unit margin deliberately excludes items that would normally be ratably allocated to each unit. Hell, Tesla even fired most of its marketing department and cut its marketing budget so that it could goose the financial metrics it needed to make the S&P.
In that sense, it worked. Tesla is on the S&P. The downside to being on the S&P though is greater scrutiny and more price friction. Tesla can no longer count on retail investors to goose stock prices with marketing stunts.