Despite their current dominance, Apple knows that downward swings of fate come fast and hard in the tech industry. Consider that 10 years ago, the biggest names in mobile were Palm, Nokia and Blackberry, and now they're either gone or hollow shells. You can think farther back and find plenty more examples of unassailable kings who went bust in a hurry. Then compare that to e.g. Microsoft, who at one point looked doomed but managed to get relevant again by using their huge cash pile to break into a capital-intensive business, which they wouldn't've been able to do without it.
I imagine in this sector more than most there's a strong temptation to amass a huge safety net so you can ride out getting "disrupted". As a leftist Keynesian I don't particularly like it-- seeing all that money sitting there doing nothing drives me crazy-- but I understand the motivation.