Amazon is all about market share and building infrastructure to support that market share. So actually the main driver of amazon isn't it's store front/web presence. They sell stuff online, so do thousands of other people out of there garages. What they are driving for in the warehouse/delivery infrastructure to deliver anything, anywhere fast and at the lowest cost. By doing that they can simply offer the same things, faster and cheaper than anyone else.
But that involves building warehouses in strategic locations, and forming deals with delivery companies that lower costs and streamline the process the whole way. At the moment, this extends to delivering to local delivery company and post office depots directly and relying on those delivery services for the last mile delivery.
They have taken that same physical strategic warehouse, tied closely to key last mile delivery infrastructure model into cloud computing. Which is essentially large warehouse of servers, strategically placed for maximum efficiency of running costs and internet connectivity to large markets.
What it means is that they spend all their money that they actually make on razor thing margins, building more infrastructure, to service more customers that they have gotten by out competing everyone on price and delivery speed. All Amazon has to do to turn a profit is to pull back a bit on the growth plans.
The latest foray is into grocerys in some large west coast markets. This is traditionally a direct from store/warehouse last mile delivery service, and offered by a large number of supermarkets etc theses days. What Amazon hope to do isn't to make a lot of money on it, but develop and support a last mile delivery service. Thus completing the vertical integration within amazon of the whole order, pick, pack, ship and delivery process.