Best I can tell, the issue is Ireland's interpretation of its laws.
Given the complexity of many jurisdictions' tax laws, interpretations of them often have to be issued. I don't recall what they call them in Ireland (it will be easy enough to look up), but in the U.S. we call them private letter rulings. An individual or a company wants to figure out the tax effects of particular actions the effects of which aren't explicitly spelled out in existing tax law. They might, e.g., want to do something a particular way and want to know how that will affect their tax liability. They may have their own interpretation of how it would work under existing tax law, but want to confirm that interpretation before they take certain actions. So they ask the taxing authority how this or that would work - they ask for clarification when it comes to nuances of tax law.
Here in the U.S., the I.R.S. then issues what's referred to as a private letter ruling explaining the tax implications of given scenarios. Those private letter rulings then serve as bases for others to understand how the tax laws would work in their own circumstances - they establish precedents for interpreting existing tax laws. That's how we, as a nation and as entities operating within that nation, come to understand what our tax laws mean in particular circumstances. No law can describe every possible situation that might arise, so we have subsequent (and meaningfully official) interpretations of those laws.
The interpretations of Ireland's tax laws which Apple is taking advantage of aren't reserved for Apple. Those interpretations would apply to others in the same situation (or doing the same things) as Apple. However, many other entities wouldn't be in a position to take advantage of those interpretations - they wouldn't be in the same situation (or able to do the same things) as Apple. The EU apparently regards that as illegal state aid because other taxed entities in Ireland couldn't take advantage of Ireland's laws (and Ireland's interpretation of its own laws) in the way or to the extent that Apple (and some others) can. But that's always going to be the case with anything but the simplest tax policies. If I don't, e.g., have a need for employees in my business then I can't take advantage of tax credits meant to encourage the hiring of veterans or disabled persons. Others can take advantage of such tax policies.