Amazon is truly exceptional, do not make a rule out of it. Bezos is kinda like Buffett, in their own league of master capital allocators. For example, Amazon got a lot of financial leverage on the "float" between credit card payments and sending the money to merchants. Again, kind of similar to Berkshire which is leveraged on the insurance "float".
Also, heavy CAPEX or any other form of internal reinvestment does not mean there should be no profits. Look at Google, Facebook, Apple, Microsoft - all those companies were bootsrapped mostly through internal cash flow. All of those companies were profitable when IPOing (just look at historic S-1s).