Because you have a right not to incriminate yourself.
Fingerprints can be used to unlock phones because your fingerprint is part of evidence.
Passcodes cannot be used to unlock phones because your passcode is information that's gained through testimony, and the 5th Amendment protects you from self-incrimination.