You seem to be questioning taxes/government in general, I'm not gonna comment on that.
Sure, individuals and companies can use the rules of the system to minimize the tax they're paying. Everyone does that. But companies like Amazon also have a responsibility to the country they operate in and in my opinion should pay taxes there. Just because some financial wizard figured out that that there is such a thing as a double dutch sandwich or what it's called doesn't mean everyone has to eat it.