They made money, sure. That's revenue. If I sell a widget that costs 1 dollar for 2 dollars, I made 2 dollars in revenue and 1 dollar in gross profit. But if I spend that 1 dollar towards the construction of a new factory, I made 0 dollars in net profit. So why should I get taxed on money that I didn't get to keep or profit from?
Amazon is not a profitable company, if you want to see how, just look at their yearly earnings reports, they're a public company so anyone can look.