I'm sure some number of website owners ran A/B tests and determined that more people signed in when it was present.
I'm also sure that some number of website owners don't know or care that it's annoying to some people.
Personally I've just learned to ignore it; but if it did annoy me enough I'd zap it with uBlock.