To a reasonable approximation, the goal of a business is to maximize the projected value of the business to investors.
If the business does not believe that it has growth opportunities that beat the market, then it should try to generate a profit and return that to investors so that they can look for better opportunities. Conversely if it does believe that it has such growth opportunities, the business should take any free cash that it generates and reinvest that inside of the business. If they are right, they will grow faster than the market. If they are wrong, they will at least acquire resources that can be sold later to recoup at least some of that money.
Amazon in particular pushes a tremendous amount of flexibility to individual business units to pursue growth strategies. As a result they always believe that they have better internal growth opportunities than the market in general. Their rapid growth is a demonstration that they have been right more often than not.
They can switch to generating profit at any time that they want. Just shut down unnecessary areas of the business that are losing money. (Something that they do all of the time whenever they conclude that an idea hasn't worked out.)
However when they take that decision, that will be evidence that senior management has lost confidence in the organization. Which will be a sign of internal problems.