That's what I am thinking when people talk about tax cuts. Apple or Google don't need more money. They already have more than they can invest productively.
That's an explanation -- another is that Apple and Google believe that future uses of the resources could yield greater aggregate return (or serve as a bulwark against a downturn).