Indeed, if you reinvest almost all your profits in the business instead of taking them as earnings you pay very little in taxes. Taxing investment would be a very stupid thing to do since it would discourage what makes society richer in the long run.
Gaming the system is what I'd call their sales tax treatment. They didn't collect it everywhere until they got so large that they're warehouses and datacenters were everywhere. And depending on jurisdiction I think its the 3rd party sellers' responsibility where possible.
Anecdotally, I absolutely and conscientiously used Amazon as a way to avoid paying sales tax when I was younger and less financially stable.