That very much depends on the workplace. I was let go once for being 'slightly below average', because I kept foolishly spending the time to fix things in ways that didn't result in more bugs.
I literally inherited a dev once that was so bad we vastly improved velocity once he left. Every couple of months we fixed a weird bug in the code he wrote and laughed about it.
The middle manager loved him because we was very eager to work and always around