According to an article on Slate, Apple avoids taxes by accumulating debt (emphasis mine):
On the earnings call, Apple’s leadership did more to explain why they’re going to start borrowing money and it turns out to be pretty uninteresting: Tax avoidance. [...] But by hook or by crook, the upshot is that a very large share of Apple’s cash is located “offshore” and in order to use it for share repurchases or dividends, Apple would need to “repatriate” it and pay corporate income tax. The statutory corporate income tax rate is quite high—35 percent—so it turns out to be cheaper to borrow the money and pay interest than to repatriate cash and pay taxes.
Ironic, is it not? It’s better to be in debt than to pay taxes to the government. This remains true even if you have $145 billion sitting in the bank which could go toward share repurchases and dividends but because of the high corporate income tax, it can be done more efficiently by accumulating debt. In other words, the government rewards debt and kills with taxes. Knowing that companies operate like this, how in the world can we expect taxing the rich to work? The higher the taxes, the more likely companies are motivated to avoid them. Even small time investors like myself get charged these ridiculous income tax rates. Is it any wonder that companies don’t want to pay them?