Because the market loves Amazon's growth in an irrational way that seems to have no end.
AWS, responsible for a majority of Amazon's profits, should continue to grow for at least the next five years. That growth has slowed as other competitors have entered the market more seriously and as AWS reached a level where growth was simply no longer possible at near triple digits, but it should continue to increase Amazon's profits.
The better question is why shouldn't you invest in Amazon? When is their retail growth going to seriously slow down, because there has to be an end to it? And when it does slow down, how is the market going to react when it realizes you can't just flip a switch in retail and start increasing margins to actually make money, so I'm stuck with a slowing growth stock that has a PE of 300 and no dividend in sight?
Right now it looks like Amazon is going to blow by Apple and be the first to a $1T market cap, I wouldn't bet against that at this point. They announce earnings July 26, it could happen that soon at the rate they're going.