Harmonised means ‘applies to all’. It doesn’t mean that Ireland were not nuder EU rules for the criteria of taxation. Ther are lots of things in the EU no doubt that apply to some countries and not others.
Whatever the outcome Apple knew what they were doing. I would bet money, (and I mean my own money too), that at worst Apple either knew they were doing something underhand and at best they fashioned a deal that whilst not legal, wasn't strictly illegal either. You know, kind of when people teeter so finely on the edge of something it’s difficult to call it one way or the other.
Get your facts straight.
EU does not have tax law under its core and non-core competencies, as provided by the EU treaties (Maastricht, Rome, Lisbon.). Individual Member States within the European Union (Both within, and outside the Eurozone) have their national tax systems.
Therefore regulatory arbitrage can happen, because there is no 'EU tax law' rules as such. Companies are free to establish companies in Ireland and Luxembourg and use their national legal systems, and use that to cover their other European operations and subsidiaries.
If you look closely at how the European Commission is pursuing the cases (Apple, McDonalds, Amazon, ...), they are doing so under EU
competition law (As there is no harmonised EU tax law.), under the argument of 'illegal state aid'.
Not contravening EU tax law, because that
doesn't exist.
What they are doing is not illegal under EU law, and national law. If politicians want to reform it, they should do so via legislation (E.g. EU directives and EU regulations.). But then the companies would then leave the EU, therefore damage employment and tax receipts.
Obligatory 'I am not a (qualified) lawyer' disclaimer.