That's only the Apple ID/iCloud/account password, which plays only a minor role in end-to-end encryption.
The phone passcode is the (secret which gates, on Apple's HSMs,) your iCloud encryption key!
https://support.apple.com/guide/security/escrow-security-for...
Got "1234" as a passcode on a long-forgotten family iPad or test iPhone? Better go change it to something secure, as that's what stands between an advanced attacker (that can compromise your 2FA), or somebody able to compromise/apply sufficient pressure to Apple, getting into your iCloud end-to-end encrypted data.