Apple does what most big companies do, they rely on other companies to provide the physical infrastructure for their data services instead of building their own data centers.
The value of AWS to Apple is that it allows Apple to rapidly expand and shrink their rackspace depending on demand and usage. So if sales numbers are very high one month, or iCloud demand spikes, they can rapidly buy up more capability.
If Apple was relying on their own data centers to provide iCloud they would need to be very careful go always have mode capability than required and to anticipate spikes in demand. For example, if iOS 9.4 has some new iCloud feature, all Apple needs to do now is instantly buy more rackspace from AWS. But if they relied on their own data centers, they would have needed to start building up the infrastructure years ago, probably before the idea was even thought up.
So that's the benefit of using third party server providers like AWS and Azure, rapid flexibility.
But there are downsides. Using AWS and Azure is much more expensive than if Apple had just built the data centers themselves. It's also more complicated, because it means Apple has to be using three API's (AWS API, Azure, and their own internal API since iCloud does still use some Apple servers). Another downside is that Apple doesn't really have much control over what Amazon or Microsoft do with their cloud services, and cannot force them to use some certain technology.
Over all, if I were Cook, I would definitely be buying up land and building data centers all over the world, and I would try to ditch AWS and Azure as rapidly as possible. Even if they build 50% excess capacity, I bet they would still end up saving a lot of money as opposed to using AWS and Azure.