The investors might have made profit but the company itself is operating in the red. This just means the perceived value is higher than it was in 1998. Which makes sense, we are talking about a company that had 19 billion dollars flow through it in a quarter, which suggests a high likelihood they could be profitable at least for some time if they chose to.
Basically amazon has been saying they are investing and in the very long term the bets will pay off. AS it stands, amazon has not opted to proceed to '3) profit' and are firmly in the '2) ???' phase of their plan.
It remains to be seen how long their investments will pay off should they decide to back off. They have effectively been buying market share and for all the investors know, they have built no 'stickiness' and that share could evaporate the moment amazon decides it needs to be profitable and stops undercutting everyone else who needs to make a profit.