As much as the European Commission tries to frame this as something other than an indictment of Ireland's tax policies, as much as it tries to frame it as only being an indictment of favorable treatment given to a particular company, at its essence this decision is the former. The European Commission doesn't want to acknowledge that this is really about the differences between Ireland's tax policies and those of many other EU nations creating unfairness (and believing that those differences themselves amount to illegal state aid) because in doing so it would be acknowledging that it had no authority to do anything about those tax policies. So it frames this as Ireland giving special treatment to Apple that isn't available to other companies.
When it's all boiled down, the European Commission is hanging its hat on the notion that these practices which are allowed under Ireland's interpretation of its own laws are preferential because the rules that apply to non-resident companies aren't the same as those that apply to resident companies. That's correct, the rules aren't the same as between non-resident and resident companies. But that's a fairly broad distinction for tax policies to make, and it's the kind of broad distinction that most all tax policies make. The reality is that tax policies don't (and for practical purposes can't) apply to every entity the same way. Situations are different and tax policies necessarily treat different situations differently. That's quite different then having tax policies that single out particular entities for preferential treatment. Whatever the rules are, some entities will be able to take advantage of them while others won't. Often those other entities will be able to take advantage of other rules while the first group of entities won't.
The European Commission is also, in effect, insisting that Ireland has to apply the arms length principle when implementing tax policy in this area - when it comes to how earnings can be apportioned between related parties. But best I can tell, Ireland is under no such obligation. As much as the European Commission and other members of the EU may not like that, as much as they may think that not applying the arms length principle leaves Ireland's tax policies open to abuse (i.e. creates opportunities for some, but not all, companies to get around paying most of the taxes they might otherwise owe), it is rightfully Ireland's choice whether to apply the arms length principle in such contexts. If Ireland's laws (and its interpretations of its laws) don't require it to be applied, then that's that.
Part of the problem here is that the members of the EU effectively want it both ways. They want the advantages of having the single market and the free flow of goods and services - e.g., the ease of doing business across borders and the flexibility of where to operate from - in order to encourage greater economic activity. But the individual states also want the autonomy to make many of their own rules - e.g., when it comes to their own tax policies. That's a recipe for creating opportunities for (legal) exploitation. If EU members want the economic benefits of the open market and at the same time want to keep certain policy autonomy, then that - those opportunities for (legal) exploitation - are part of the cost. They get the perceived benefits, they have to pay the price for those perceived benefits. They are in effect competing with each other at the same time that they are cooperating with each other. It's a tricky balance to maintain and it will naturally create these perceived unfairnesses. The individual nations either have the autonomy in question or they don't. It can't be (or it shouldn't be)... well they do, but when we don't like the result we get to say that they don't.
EDIT: I meant to add, the European Commission's assertion of preferential treatment for Apple should be easy to test. The question is: Can the European Commission identify other non-resident companies that have tried to use the same structure that Apple uses, and thusly apportioned most of their earnings so as to avoid Irish taxes, that have been told by Ireland that they aren't allowed to do it that way? There's another step to that test, but it only matters if the answer to the first question is yes.