The EU VAT situation is entirely a thing of the various EU governments' own making.
They introduced a law saying the non-EU companies selling electronic goods into the EU must collect and pay VAT on the goods.
But then they don't say that for inter-EU sales, companies must collect and pay VAT based on the customers' home address.
This naturally leads companies to set up in the EU country with the lowest VAT rates on the electronic goods they want to sell. In the case of Amazon and ebooks, that's Luxembourg, with 3%.
As for multi-national companies setting up subsidiaries in low-tax countries and using complicated licensing deals to avoid paying tax on profit in the countries in which it's earned: Any government could stop, or at least minimise this, by introducing a law that says that multinational subsidiaries must pay a minimum percentage of revenue, or the tax rate percentage on profit, whichever is higher.
But it's not immoral to buy from companies that take advantage of these problems with tax law.