Luxemberg and Ireland are both part of the European Union. Maybe allowing individual member states to operate as tax havens is not benefitting the Union as a whole?
Apple wasn’t sued or fined and didn’t go to court, the ruling compelled Ireland to collect additional tax from Apple and Ireland was the one who went on and spent tax payer money on appealing the decision in the EGC.
Until last year the EU had zero involvement in healthcare and public safety, that was every nation's own private garden.