These and other anti-employee clauses (e.g. excessive IP assignment) persist because many programmers simply don't care while others who do care are awful at negotiating compared to their interlocutors who do this for a living. When you try to push back, the standard response you will first hear, an outright lie, is that this is a non-negotiable mandate from their legal counsel and that no-one has ever complained before. If they do budge on their initial terms, they will make it seem like an unprecedented concession that warrants concessions on your end. It's a truly absurd game of back and forth.
I'll agree they'll act like it's totally weird you are complaining. Standard salesman techniques.
And companies will usually negotiate these. Usually.
I once had an otherwise nice job offer where the employee agreement contained the following three poison things:
1. you cannot work for any competitors or customers for a year (it was a consultancy, so potentially every employer in the country was off-limits)
2. you assign us your IP rights while you work for us and for a year after you leave us
3. you agree this will not limit your ability to find work.
They totally stuck to their guns. They said legal wouldn't let them change it. I had concerns and they "took the matter seriously" which amounted to telling me, really hard, that these clauses didn't really matter and they wouldn't enforce them, and, y'know, they probably weren't enforceable anyway.
I walked away. Apparently many other people don't because they continue to get new employees. I heard the horror story here on HN a few weeks ago  about someone who no one would hire because he signed something with clause 2. I'm more satisfied than ever I was right in walking away.
Since the job was in California, it was a perfectly reasonable agreement for me, but since it was my first job I probably would have signed it anyway.