That's not a good analogy. Amazon made a profit, they just chose to reinvest it in infrastructure. The above mentioned companies are still losing money (I believe).
True, it can be a good decision for a starup to optimize for market share first, profitability second. But even an IPO only gives you so much runway. Eventually you need to start turning a profit. And the longer you emphasize market over profit, the bigger the whole you've dug for yourself.
They chose to invest it in payroll, actually, which is why accounting profit did grop. Investment in infrastructure would be capitalized over multiple years and have much less impact on the current quarter, I believe.
True, it can be a good decision for a starup to optimize for market share first, profitability second. But even an IPO only gives you so much runway. Eventually you need to start turning a profit. And the longer you emphasize market over profit, the bigger the whole you've dug for yourself.