From Business Insider:
"Back in 1991, Apple struck a tax deal with Ireland that was completely aboveboard and legal. The Irish government provided Apple with a "comfort letter" that said the company would pay very low rates of tax if it based its European operations in Ireland.
In the 25 years since, Apple has created thousands of jobs in Ireland. By 2015 it had 5,000 employees in the country. Another 1,000 jobs are planned for the headquarters in the Irish city of Cork. This year Apple will open its site near the town of Athenry, with another 200 jobs in the making.
The result of the deal between Apple and Ireland, intended or not, was pretty clear: Give us low taxes, and we will give you jobs. A note from a meeting between the government and an Apple tax adviser in 1990 said:
"Apple was now the largest employer in the Cork area with 1,000 direct employees and 500 persons engaged on a subcontract basis. It was stated that the company is at present reviewing its worldwide operations and wishes to establish a profit margin on its Irish operations."
Apple is now the single largest taxpayer in Ireland, so it has the kind of negotiating strength to get what it wants.
Apple has noted that its tax arrangements were agreed to repeatedly by Ireland's government. The European Commission itself says the agreements were legal, albeit mistaken. But Margrethe Vestager, the European Commission's competition commissioner, made Apple's Irish tax arrangements sound like a scam ..."
It sounds to me like the EU commissioner didn't like the deal .. not that the deal is illegal.
25 years ago Apple did not have billions in cash.....now they do and the governments are smelling a rather large pay da...that is why suddenly it is 'illegal'.