Imagine you own the company, and the company has an ability to grow.
(1) Show profit: distribute it, put it into a bank, etc. You pay the tax on the profit; if you pay yourself a few million, this is taxed at 40-50%. Assume that your shares grow, too.
(2) Do not show profit: invest everything! Always be a wee bit in the red. Assuming your company actually grows from the investment, Your market share increases, your cash flow grows. Most likely your shares grow comfortably with that, too, at least in the long term. But you don't pay the tax on the profit. You pay the tax on the capital gains, but it's much lower. You don't pay yourself anything, because you can sell a small bit of shares to get these few millions you need.
Now, who in their right mind would show profit if they can show more growth instead?
Apple would be happy to do that, too, but they have no room to grow, it seems. Same with Google; though they invest a lot, they don't seem to find another seriously growing niche. Amazon can pull that off, though, and they gladly do. When Amazon becomes predictably profitable, it would mean they ran out of fruitful growth / investment ideas.