The most likely explanation is just that the phone's storage wasn't encrypted. Most Android phones come with unencrypted filesystems by default - iPhones do encrypt by default although there have been recent legislative changes in the UK which weaken Apple's default security.
If the phone's storage is unencrypted, police don't need to get into the phone - they just open it up, take out the storage medium, and read it using a different device.
Not a lawyer, but it's also possible that once they were arrested and charged, the perpetrators could be compelled legally to unlock even an encrypted phone.
tldr here is that if you're concerned about the authorities being able to see something, simply do not put it on your phone. End of.
That's reasonable - security is always context sensitive. That said there are easy steps most users can take to make their communications less easily accessible - encrypting your phone and using end to end encrypted chat - for extra safety you could use a messenger that supports disappearing messages too (even if you're setting a long disappearance time, say 1 month).