Humans can't leave their old brains at their previous employer, can't delete their experience learned on proprietary data. It wouldn't make sense for the law to fight this.
But the law can control what can be done with information stored outside of your brain.
Human brains are in many ways privileged agents in a legal and copyright system, because it exists to serve the needs of humans.
Artifacts produced by human brains are not.
The fact that California allows this to happen (banning non-competes and rejecting "inevitable disclosure") is exactly why Silicon Valley started here and remains here. It's exactly why ex-OpenAI people could start Anthropic. It's why neither OpenAI nor Anthropic have a monopoly on AI today. It's great both for employees and for the general public.
On my 50s and never saw one of those, that could be legally enforced anyway.
It depends on your contracts (aka NDAs). Sometimes employers do ban for that very same reason from joining a competitor(s) for x years from date of separation