This question already has an answer here:
Due to some iCloud struggles, I had recently occasion to sign into and out of iCloud on OS X a few times recently. Interestingly, when I have 2FA enabled on my iCloud account, OS X asked for the screen lock passcode to my iPhone when signing in to iCloud, and would not sign in without it (no . After the initial sign in succeeds, it prompts for the iCloud password again, and this time asks for the 2FA code.
This was a surprising and unexpected part of the authentication flow. Does anyone know why iCloud / OS X / iOS interact in this way?