It's because you've already entered your iCloud password when you signed into iCloud on your device. Now you only need to prove you have access to the device via the passcode. If you were not signed into iCloud on your device, it would ask you for the iCloud password, instead of the passcode.