The problem is that this money is not exclusively earned abroad. Large companies can easily setup shell "holding" companies that own their IP licensing and use transfer pricing to pull fund legitimately earned in countries where they would owe tax out to the tax havens by use of internal licensing fees. And since the US corporate taxes are on profits and not revenue, this internal transfer of funds is heavily abused by anyone with a half-way competent accounting department.
Overly Simplified Example:
Fictitious Licensing Cost of already developed internal system: $80M
Staffing Costs: $10M
Taxable Income: $10M instead of $90M
Effective Tax: $3.5M instead of $31.5M
Evaded Tax: $28M