Paying a dividend is what a company does if it thinks it cannot invest the money better than its shareholders could.
Apple thinks it can make good use of billions of dollars and Microsoft thinks you can do better with the dividend.
It doesn't seem like Apple really has a plan for it's pile of cash. They just don't want to pay a dividend and they don't want to buy back stock and they don't want to acquire much so it just keeps building up.
http://luhman.org/blog/2004/07/23/dividend-capture-and-micro...