I don't disagree with what you're saying otherwise.
Example: A company, acting "morally" as you define, pays more tax than it is required to under the law. In so doing, it incurs a loss so severe that it must cut staff in order to remain viable. Among those employees cut are some of the more vulnerable - those with low savings, poor health, or babies on the way.
Has the company acted morally?
Consider another issue: Should the same company pay more than its legal obligations in every jurisdiction to which it is subject? How should it allocate its extra giving? What if, in some of those jurisdictions, there's a good chance the extra money will simply go into private pockets via graft and corruption, instead of serving the public good? (There are such jurisdictions in the EU, yes?)
These issues are not as clear-cut as you suggest. It's far better for the tax law to best reflect the morality of the citizenry, and then fully excuse the citizenry (including business entities) from seeking to legally minimize those taxes.
Usually not an issue in this case, since corporation tax covers profits. If anything, corporation taxes encourage greater employment.
Amazon are not profitable as far as I read their sheet.
All these loopholes are perfectly legal and companies actually need to exploit them to remain competitive.If they didn't then any competitor could decide to do this and could earn 30% less and still make a bigger profit.
It would of course have been great if the representatives had been self-aware enough to agree that they might not be taxed effectively in a global market and that they would be willing to co-operate with aligning global tax incentives in a way that leaves it a level playing field for all competitors; but that's probably a bit much to ask ;)