I’ve been working in computer security for 38 years. Short answer: it’s useless.
Longer answer: there’s no imaginable GUI-based brute force attack that will discover my password, other than a quadrillion to one lucky chance, and adding a few seconds delay does absolutely nothing to change those odds for any real world foreseeable attack.
If I mistype my password, there is literally no reason to wait. And if there was an actual real world risk that someone would launch a GUI-based attack on my lockscreen (let’s say a usb key that spews passwords out rapidly), then developers would have a delay that kicks in after a dozen or more mistyped passwords; or better yet; just put in a really big delay after, I don’t know, maybe a hundred or a thousand attempts.
If on the other hand, you have a terrible password, and it might be easily guessable to someone, then the two second delay also does really basically nothing, because “easily guessable” generally means twenty or less or maybe even a 100 or less passwords, and if someone has access a laptop with a password where the password is terrible, you’ve made them have to wait golly like three minutes.
But the most likely scenario for guessing your lockscreen password is that they found your password written down somewhere in which case the delay does even less good than nothing.
The ONLY thing the delay accomplishes is to annoy me when I make a typo. That is it. There is literally NO OTHER EFFECT.
These delays are in place solely for traditional reasons. The were first put into place on terminal-based and network-based login prompts, where the speed of brute force attacks was limited only by the network speed (which was slower then). And that was also an era when even experienced people really did use legitimately terrible passwords quite often.
Of course, in theory, in network situations even today these delays MIGHT still make sense. But, as I suggested above, what real world systems that actually see real attacks do is NOT a delay. Like ssh typically has no bad password delay. Rather, it’s assumed that you’ll have fail2ban or similar just block things entirely after X number of bad attempts, rather than needlessly adding a delay that will not affect an automated program at all, but will annoy real human beings making typos.
It is just tradition and momentum that gets people to stick with these delays that do nothing, when there’s smarter solutions that actually work.