They gave Apple more than enough options, and plenty of time, to just comply with their pro-consumer rulings.
Apple very clearly and intentionally decided to not do that in the most transparent way possible, because they either assumed that the EU would just give up, or they assumed that any penalties they'd incur would be lower than the revenue they currently gain from their monopolistic, anti-competitive behavior. This is a typical FAFO situation for Apple, and I hope they learn from it when other jurisdictions, particularly the US, come after them.
I think you're misunderstanding something. This case was about a tax deal Apple had with Ireland a decade ago, not about consumer rights or anti-competitive behavior.
Except they were avoiding tax in the rest of the EU, so the EU can fine Apple for skirting taxes on products that were actually sold in those other areas.
tl;dr - EU makes rules that companies need to follow no matter which EU country they operate in.
I don't agree that "retroactively made illegal" is the same thing as "illegal", nor should it be called "skirting taxes" when everyone who was involved was okay with it until today where the EU unilaterally decides to alter the deal and punish apple.
The article connects this specific case with other actions the EU is currently taking against Apple and Google. I assumed the "guess it's time for the EU to milk that cash cow" comment alluded to this.
Having US corporations obey the laws of the countries they operate and do business in, is historically a foreign concept for them and the US government.