The real value of a stock is what it can be sold for. The idea that stock value is linked to the corporations' profitability, or P:E ratio, or some other metric only holds if everyone else is using those metrics to value the stock. In reality this isn't the case. Large hedge funds, wealthy investors, money managers, etc. have the financial means to influence the value of a stock in ways that the average investor cannot. If you're assuming the value of a stock is based off supply-demand, a large hedge fund, like Citadel, can influence the value of Tesla stock just by buying large quantities of stock.
If there are 1000 shares of a stock and current supply-demand equilibrium dictates those shares are valued at $10/share. 1 share can be bought at $10. But if you buy 100 of those shares, you decrease the supply and increase the demand for shares. A new supply-demand equilibrium point is met and those shares are now worth more than $10/share, maybe $20/share. As a physisican, or small investor, you don't have the ability to buy enough shares to increase the value of the stock in a meaningful way, but a large hedge fund does. And while they are doing that, they can hire PR firms to push "news" showing Tesla in a favorable light. So on your apple iPhone news app, or stocks app, or Bloomberg, you starting seeing articles stating "Tesla Sky-Rocketing as soon to be included in the S&P." And then all the dumb money (e.g. physicians, small business owners, wannabe day-traders) start buying Tesla stock. Then the large hedge, slowly, starts selling shares and making real money.
The whole idea that a stock is linked to corporations' profitability doesn't correlate with reality. In an ideal world, when a corporation has a profitable quarter, those profits are distributed amongst share holders as dividends. The reality is that when one of these large corporations has a great quarter, the CEO, board, and high level executives give themselves fat bonuses. Or do issue dividends but only after they have issued themselves additional shares (that the average investor would have had to paid real money for). They take the lion share of profits for themselves. There is no contract stating profits be equally distributed through dividends, so why would anyone expect them to do that??? The stock market is a Ponzi scheme. The only real value of a stock is what you can convince someone to pay for a piece of paper that has no intrinsic value. If the value of the stock drops to zero and you hold 10k shares, does the corporation liquidate it's assets to provide you with some money on those 10k pieces of paper you bought for $100/share? Hahaha, nope... The people who win out are the heads of the corporation, the investment banks who hold the IPO, and the large investment funds who are able to convince the dumb money to buy meaningless pieces of paper individually, through their 401k, or money manager. It's a house of cards.