I work in Private Equity and have experience with this type of stuff. Honestly in my opinion, there's nothing to see here other than a great case for why the US corporate tax rate should be lower.
There are two separate concepts worth discussing. One is money that was MADE offshore and remained offshore, which I don't think anyone should take issue with. That money is used to fund international operations and international acquisitions (and is invested--I recall reading that Apple runs the world's largest hedge fund via its balance sheet cash). No big-wig executive or shareholder benefits from this cash being offshore - in order for them to see any of it, it has to be repatriated, at which point it is subject to US tax.
The other concept is money that was made in the US, but is treated as if it was made offshore. The way this works is generally via IP transfer. If a US company transfers its IP to a subsidiary in another country (Ireland is popular, for example), then that US company has to pay royalties to the international subsidiary as it does business. So US Co. makes $100 in search revenue, but has to pay $90 to Ireland Co. for the right to license the IP (oversimplified but that's the gist). $10 gets taxed in the US, and $90 gets taxed in Ireland, the profits remain in those respective countries. Note that when the IP is transferred to the other country, that transaction is taxable - the Irish subsidiary has to "purchase" the IP from the US, which is a taxable event that the US government receives tax income from.
However, after the IP is transferred and once operations commence, this becomes frustrating for the US government (and citizens) because money that was made in the US becomes taxed in Ireland. However, even in this case, in order for US executives or shareholders to ever get this cash, the money must be repatriated, at which point it is subject to US tax. So the money ends up just staying offshore, until the company can either negotiate with the US government for more favorable tax treatment, or until it gets used for an offshore purpose.
Long story short, if the US corporate tax rate was lower, we would not have this problem. Companies would not transfer IP offshore to achieve more favorable tax structures, they would just keep the money in the US. My personal opinion is that the corporate tax rate that maximizes revenue for the US is much lower than the current 35%.