Apple refused an FBI order to decrypt a phone; however they allow the FBI to access iCloud data all the time. And iMessage is not end-to-end encrypted in iCloud at the explicit request of the FBI. https://www.reuters.com/article/us-apple-fbi-icloud-exclusiv...
Which makes it all the more ridiculous that sensitive things like messages, photos, contacts, and notes aren't, even as an option. Clearly the technical ability is there.