I think people mix up the Ireland tax haven and the issue of US taxing overseas income.It's also a problem created by the EU and Ireland. No matter how Cook wants to spin this, the simple fact is that Apple has a tax haven in Ireland where supposedly its research is performed. Yet, for some reason, features and updates are always introduced in the US first, and the countries of the EU have to wait.
I like Apple in most regards, but in this regard Tim Cook is really trying it on. Is Apple tax haven legal? Yes. Is it mmoral? Yes.
The US is one of the only countries that has a tax code that taxes you on profits made in other countries.
A simplified description:
If you are a US company, build a computer in China, and sell it in Germany, you pay German taxes, and then US taxes when you bring the money home.
But if you're an Irish company, build a computer in China, and sell it in Germany, you pay German taxes only. You don't pay Irish taxes on a computer that wasn't sold in Ireland.
The rest of the world operates on the latter principle. Because the US expects you to pay US taxes on foreign profits, that makes it really bad to be a US company.
So, companies go out and form a secondary company for all non-US sales, and put that headquarters in another country. In this case, Ireland is selected due to low corporate tax and because of other, separate tax tricks you can do out of Ireland. If Ireland wasn't an option, virtually every other country in the world would also work, Ireland just has other bonuses as well.
Tim Cook wants the US to drop the tax code that says "You pay US taxes on your business in other countries after paying their taxes too." Because it's not actually raising money. It's just leading to companies not bringing their money back to the US to avoid getting taxed.
Politicians spin this in silly ways. It's easy to get political points by accusing Apple as a tax avoider. Democrats and Republicans alike spin this pretty badly. I've seen several politicians do stuff like divide global profits by US taxes to claim Apple only pays 4% in "net effective" taxes. It gives them free points to villainize Apple on a stage.