Why would a cash-rich company borrow money? I have read that Apple Computer issues corporate bonds.

Considering that it has $200 billion in cash, and the company complains it has been unable to spend its enormous amount of cash, why would they be issuing corporate bonds?
You are right that it seems strange why a cash-rich company is borrowing. In the case of Apple, the money that they are borrowing is being used to pay dividends to shareholders. The reason why they aren't using their \$200 billion is because doing so would cost them tens of billions of dollars in taxes. The current US tax code taxes corporations at 35% when they bring money they made overseas back to the US (this is called repatriation). So while, Apple has \$200 billion on the surface, \$180 billion of that is sitting overseas and can't be used to pay shareholders. It is cheaper for them to borrow money to pay dividends, than incur the huge tax costs associated with repatriation.

In general, however, borrowing is also attractive to firms today since interest rates are so low. If you can borrow at 4%, and expect to earn a return of 8% on that capital, taking on debt seems like a good deal. Therefore firms flush with cash still may borrow if they feel the return they can earn on the borrowed money is greater than the cost of interest. 

Check out this article from Bloomberg for more information on the Apple case: Bloomberg Article