In France, and I believe in many other places as well, you can't have a noncompete without proper compensation. Compensation is relative to how it will affect the former employee career, it is usually less than a full wage, but it can be that if it makes finding a new job particularly difficult.
There have been a trend at one time of bullshit noncompete clauses that were too broad and didn't come with compensation, these are not enforceable. If they tried to sue the employee (they don't), they would be laughed off by the judge.
The rule of thumb should be that the majority of employees under noncompete should be happy about it (because of the advantageous compensation). It is only a problem when it is not the case.
Not you can argue about the value of secrecy vs openness to society as a whole, but that's another debate.
Every time there is a discussion of non-competes on HN there is always a bunch of confused people who can't grasp the difference between NCA, NDA and NSA. You don't need NCA to "protect company secrets" or ensure that people don't just steal company's clients or something. Non-competes are only needed to depress the wages by making it very hard for employees to change jobs, end of story.
This justification can be extended a bit to people in executive management roles at corporations, but for regular employees? You either got their salary value out of them when they worked for you or you overpaid them. I don't see additional societal value to a non-compete except in edge cases where an employee quits within a short period after hiring - staying just long enough to gain skills without generating a corresponding amount of value for the company.