In this particular case it was a breach of EU state aid rules, Ireland's Government has been very much opposed to the decision, which is why comparisons to the IRS don't really work all that nicely. From a legal perspective it's really more a question of competition law than tax.
But the EU can be relied upon to expansively re-interpret its powers after they have been agreed. It happens frequently. They have since decided that in Ireland's case, low tax rates are the same thing as direct subsidies. Obviously Ireland is not giving money to Apple, it's the other way around, but now "not enough" money is considered by the EU to be illegal.
This interpretation of the treaties was never raised previously and not surprisingly Ireland was very upset about it, as they'd been given assurances the EU would not interfere with their low corp tax regime. That's why Ireland is fighting it on Apple's side. It's not just about Apple. It's about the EU taking control of a policy that the Irish government thought they controlled.
What is less clear is the nuances of "just how" Apple was given favourable treatment.
It's very much in the fine details of Ireland's agreement with Apple, but what it boils down to is that Ireland gave an evaluation of Apple's tax liabilities tailored to Apple.
Even without this, Apple's tax liabilities would have been highly favourable but it is this "technical" matter that puts Apple & Ireland over the line, and is the basis of the 13bn figure, which is only a fraction of what Apple actually manages to avoid paying with their creative tax practices.
The best plea that Ireland can make in this regard is ignorance, but now that rules have been clarified the adjustments must be made.
I felt that Apple's whole response to this was highly disingenuous and inflammatory.
It is a power grab by the EU in an area that the treaties explicitly state the EU does not control. End of story.
edit: Also see below where I discuss the article in question, which is anything but clear
Accepting bank deposits is a good thing, it didn't create any costs for the government of Ireland. On the contrary, it likely funded lots of economic development. Which is exactly why Ireland did and should have offered a near zero tax rate.
It funded "a little" development. Provided a bunch of jobs down in Cork and the promise of a few more once their (now reneged upon) datacentre came online in Athenry. Nontangibles include putting Ireland on the tech map.
But, whatever the appropriateness of the remuneration for Ireland, the taxation was being applied Europe wide for access to the broader European economy.
So this tax is not only due to Ireland but the European economy as a whole.
I'm sorry if these nuggets of truth get under some people's skins but that's how it is.
The EU has rules to prevent a race to the bottom. In the long term, they are good for every single EU country, because they allow to actually tax companies, instead of lowering taxes to around 0.01 Euros annually otherwise. Yes, Ireland may have made the best offer this time around. But a year later, it would have been Croatia or Luxembourg.
The value of having a base within the EU is shown by Apple going to Ireland, instead of 0-tax jurisdictions like the Caymans. That value, which Apple uses to create its profit, needs to be financed by taxes.
You probably think this sounds silly, but it’s what the majority of the voters here want and the EU though slow is moving with the people not the corporations.
Apple paid all the taxes it needed for "market access", this is just a question of what they do with the remaining profits after they paid those taxes. And where they base their IP, which obviously isn't going to be France or Germany.