There is demand for these stocks in part due to the possibility of future profits through the monetization of these users. As well as the possibility of the company being acquired by a larger company (whereby exiting shareholders can sell their shares at high values or acquire shares in the purchasing company via share swaps).
Nowadays there is also a lot of pure speculation going on without any fundamental value considerations. This is akin to gambling, and in a bubble market it can look like the casino keeps paying out as everyone keeps converting their winnings into chips and bets it all again. But the market isn't a casino, and bubble stock values are held up by the demand to keep playing. This is great for everyone until everyone tries to sell at the same time.
Amzn's core businesses are very profitable, but they are constantly reinvesting those profits into new areas where they are growing. It's like a conglomeration of start ups, each aiming at future profit. It's like you've invested in one profitable company, and instead of dividends, you are getting shares of new start ups.
TSLA has now been profitable for 9 quarters, recently massively profitable with billions in free cash flow. Analysts are projecting even more to come, with profit margins approaching that of Apple and a total addressable market 10x the size. (I feel like TSLA is one of the few exceptions to the problems the author identifies in the article.). The TSLA bulls that I follow are all talking about future profits and how to discount those to net present value.
The "plan" with these growth companies is to reinvest in themselves and keep growing as big as possible until the cost to grow is too much, or the ROI from growing is less than is generally available elsewhere. Only then will they pay dividends or do stock buybacks (which are functionally equivilant, but with favorable tax ramifications). The "plan" is that you hold for 10 or 20 years or more and then get your dividends then. Or sell at a profit sooner, because the stock will be worth more because it will be closer to that future pay day.
You can expect unprofitable companies to give you money in the future if you believe in their business plan and believe that they can execute.
By the way, I hope you didn't find my tone condescending because I made such simplistic examples, just trying to be helpful, but probably mostly helping myself understand by typing it out :)