Companies put all sorts of things in contracts. Doesnt mean its legal.
Non compete clauses are commonplace yet almost never enforceable through the courts.
I worked with a guy who quit his senior role and took his entire team and their clients to the competitor. There were talks about lawyers but I never heard any more than that.
Funny thing is a few years later my company bought out the other company and he came back, with most of that team.
If there was serious anger at what he had done I would think they would have retrenched him rather than bring him back.
Yes great call, I had a non compete clause in a contract a few years ago. When I left I got legal advice and basically they said it was unenforceable, they'd pretty much have to prove that you'd used confidential company information to steal a client, and then that would have to result in a loss of revenue big enough to want to fight it through the courts.
I'm not sure even if there was a clause in a contact they'd want to sue over revealing what you make to a co worker, maybe use it as an excuse to get rid of a low performer though.