May 1 (Bloomberg) -- At first, it struck many people (including me) as passing strange that Apple Inc., which is sitting on a $145 billion cash stockpile, would partially finance a $100 billion reward for shareholders by issuing $17 billion in debt.

Apple's annual cash flow, moreover, is twice the size of the debt issue.

Turns out, $102 billion of that mountain of cash is sitting in overseas accounts. Apple doesn't want to pay the corporate tax bill that would come due if it brought the money home to pay dividends or to buy back its shares. Instead, it's selling $17 billion of corporate debt.

That's how twisted the corporate-finance logic and corporate-tax system seem to have gotten in the U.S. A major company is taking on a huge amount of debt, interest payments on which will be tax-deductible, to reward its shareholders. Meanwhile, the company avoids repatriating overseas profits, which would have been taxable once they entered the U.S., depriving American taxpayers of much-needed revenue.

It all makes perfect sense if you're Apple Chief Executive Officer Tim Cook. First, the debt allows him to make good on his recent pledge to return $100 billion to shareholders through 2015. Cook is fighting the perception that Apple is hoarding cash because it can't figure out what to do with it -- and that its extraordinary pace of innovation is slowing down. The company's share price had plunged 44 percent in the last seven months to $390, from a high of $702 in September. The shares have since rebounded to about $443.

Apple had its first profit decline in a decade last quarter, in the face of competition in mobile devices from Samsung Electronics Co. Large shareholders, notably hedge fund manager David Einhorn, are demanding special payouts to reward their patience, and Cook hopes the $100 billion will silence them. It will cost him far less to borrow the money than to would to pay corporate taxes on repatriated funds.

Second, because Apple's balance sheet is so stellar, it can borrow at interest rates that are only slightly higher than what the U.S. Treasury pays, and barely above the rate at which banks say they can borrow from each other, as measured by the London interbank offered rate.

Bloomberg News reports that Apple's five-year notes pay 40 basis points, or 0.4 percentage point, more than similar-maturity Treasuries. Its 10-year securities are yielding 75 basis points more than Treasuries and its 30-year bonds are paying an extra 100 points.

Third, at a time when the U.S. Federal Reserve is snapping up Treasuries and driving down interest rates, institutional investors and even sovereign governments must look elsewhere for extremely safe, high-yielding investments. The demand is driving down borrowing costs: Average yields on investment-grade debt worldwide dropped to a record-low 2.45 percent this week, from 3.37 percent a year ago, according to Bank of America Merrill Lynch's Global Corporate Index.

Apple isn't the only company taking advantage of the situation. Microsoft Corp. last week issued $1.95 billion in debt. Microsoft sold 10-year, 2.375 percent securities at a yield 70 basis points higher than Treasuries -- an even tighter spread than that on Apple's 10-year bonds.

So Apple's bond sale, its first since 1996, is being welcomed with open arms. It is the largest U.S. dollar-denominated corporate offering on record. (Roche Holding AG did a $16.5 billion deal in 2009.) My only question: Where do I go to get cheap money like that?

(Paula Dwyer is a member of the Bloomberg View editorial board. Follow her on Twitter.)