Where did you hear this?
Trying to access data on iCloud doesn't render it inaccessible, certainly not inaccessible to Apple.
The San Bernadino shooter didn't have any iCloud data, they wanted to access his phone but they couldn't just go trying passcodes because of an increasing delay after each attempt and possibly (depending on configuration by the user) erasing the whole device after 10 failed attempts.
They wanted Apple to craft a special iOS update just for this phone that they could load in "DFU mode" with an attached USB cable that would bypass the limits on the number of passcodes they could try (or maybe bypass the passcode altogether, though I'm not sure that was possible then - and definitely isn't possible now with the way the Secure Element works)
Apple has always had access to your iCloud data - it is encrypted at rest so employees can't just go snooping it but if they get a court order they can produce it in unencrypted form. Most of it at least, I think some of it is double encrypted and only the user's phone can access it but stuff like text messages, call history etc. is not double encrypted and thus can be made available by Apple to a court order.