Even Amazon's core business area doesn't earn much of a tidy profit, but yet for some reason the company's stock seems to keep chugging along.
Investors believe that they will be the only company left standing, at which point they can earn a lot of profit due to lack of competition. Also, once they have a dominant position its fairly easy to keep anyone else out of the market as they can always drop their margins again and the cost of entry at Amazon's scale limits the potential players who could even try.
They've even had quarters where they lose money because they're still grabbing business from other retailers and working towards their end game. All that aside, I'm not really sure if their stock is worth it at the current price. Their P/E is through the roof, so it's only worth buying to sell later or holding onto for the long haul when they reach that end state.
Amazon has lots of competitors...Wal-Mart, BestBuy, Staples, Newegg, eBay, NetFlix, Apple, Google, and Microsoft.
Wal-Mart is their only real competitor, but even Wal-Mart doesn't have the same selection as Amazon or anywhere near the online presence. They're far more concerned with their physical retail stores.
Otherwise Amazon sells almost everything, while companies such as Newegg, Apple, Microsoft, etc. only sell a small subset of those products or services. Amazon can certainly take business away from those companies, but not their core business. Apple doesn't make much profit from their music sales compared to the rest of the company so they wouldn't miss it. Same goes with Microsoft and their cloud offerings. They will probably destroy Best Buy before long and could eventually put Newegg out of business if given enough time as well.