It seems that Ireland giving aid specific to Apple and not others is the crux of the issue? Not sure how that’s illegal.
US does exactly the same, also in car manufacturing. This is normal market behavior, countries protect their companies. Apple has nothing substantial in EU, completely foreign force milking the market and paying nothing in taxes. Now if they opened big factories and research centers, they would be treated very differently but they prefer Foxconn or other chinese companies.
Now perhaps the EU as a entity is moving towards collective taxation policies, but it's not there yet and there's still an aspect of getting away with certain fiscal policies depending on any member nations "clout". Perhaps Ireland is mostly guilty of not having said clout.