Ireland granted Apple a 1% corporation tax rate, resulting in Apple allocating virtually all their EU profits to their Ireland subsidiary. similar deals often take place in Luxemburg and other small EU nations. One wheeze is to allocate significant costs to your intellectual property rights (brand name) You register the brand name in the country with the low tax rate and then charge back the operating company for use of the brand, e.g. if a starbucks coffee is £3 the UK branch pays the sister company in the low tax Country 30p for use of the brand reducing the UK tax bill to virtually zero.
It is good for the national coffers in Ireland etc, 1% of verything across the whole of the EU rather than 20% or so of the company profits in just your small nation.
It works for the small nations, but not for the likes of Germany, France, Italy etc who are somewhat agrieved by the loss of income. The original judgement was that Apple owed Ireland $13bn which at face value looked a good deal for Ireland, the consequences however would have been that the major tech companies that had set up Ireland HQ's to channel their profits through would have all then had to pay far more tax the result of which would have been pulling out of ireland as they might as well then pay the tax elsewhere in the EU where it would be more convenient to locate.
It will be interesting to see what happens here in the UK, as we separate from the EU it would seem inevitable that our Govt will look very carefully at the likes of Apple allocating 5% of their profit in the Country the goods are sold and the remaining 95% to their Eurpoean HQ
Germany etc will be pushing very hard for an appeal over this
That's why I'm of the belief that if your company operates in a country you should pay taxes on the income there, the onus shouldn't just be on the employees to pay taxes but the employers too.