It's just that I usually attempt to enter that code quickly if I have to, so I never consciously noticed it.
It seems great to me because when I enter my code slowly, I'm probably having input problems anyway (e.g. rain, thin gloves, tiredness).
And in these situations, the behavior felt so natural to me that I only now notice it.
I agree it may seem weird from a coherence standpoint, but the character appearing on keydown like it does just felt natural to me, just like a Win98 native button-down state.
These buttons don't behave like physical push-button phone buttons.
Regarding the calculator, the use case is the exact opposite, and I wasn't arguing against this regular "keypress" behavior anyway, just against the original suggested "keydown" behavior, which I'd consider a nightmare when used for tapping an on-screen keyboard.
The "bastardized" version on the iOS lock screen just has suited me well for this use case, especially when talking about numeric lock codes
The simplest comparison point is the calculator app which behaves exactly as you described: if you put your finger down on the number 9, a 9 won’t show up until you lift up your finger. OTOH, if it worked like the Lock Screen, a 9 would show up, but would then be removed if you moved your finger away and lifted up. But again, nowhere else works this way.
If you think this is good interaction design, do you thus think the calculator app has bad interaction design? That it should instead be adding numbers immediately and then retroactively removing them?