It's it's closed source, assume the worse.
For most people's threat model, this is not necessary, as even in the case of the San Bernardino terrorist iPhone, Apple doesn't tend to defeat their own security measures on demand. But following that situation and others, Apple added additional measures making it even more difficult for themselves.
See this support article:
"Advanced Data Protection for iCloud is an optional setting that offers our highest level of cloud data security. If you choose to enable Advanced Data Protection, your trusted devices will retain sole access to the encryption keys for the majority of your iCloud data, thereby protecting it using end-to-end encryption. Additional data protected includes iCloud Backup, Photos, Notes and more."
It's not like phone and iCloud data hasn't been subpoenaed before.
I'll keep my nefarious behavior on this side of mass murder, and FBI doesn't read my documents.
> It's hard to understand why anyone would choose anything other than Apple these days tbh.
You could just not put your data into the hands of one of these companies.
I'm not deeply familiar with Apple's encryption systems, but from the other commenters here, it appears that Apple holds the keys and also controls the source code and distribution to the device. It sounds like it might be trivial for them to invalidate their own security.
https://support.apple.com/en-gb/guide/security/sece3bee0835/...
The internet is full of sources that go deeper than what Apple thinks the general public is interested in.
Here is another PDF describe the security certifications. https://help.apple.com/pdf/sccc/en_GB/security-certification...
One could also start here with another third party review of the cryptographic process.
https://csrc.nist.gov/CSRC/media/projects/cryptographic-modu...
Here is a document with other third party certifications of the validity of the original document.
The full picture is quite complicated but a curious person has access to more than enough data to either make an informed decision or decide to trust no one.