Other states don't restrict job-hopping, they just stand by and don't interfere as the free market ends up having the effect of restricting job-hopping. Employees end up signing restrictive employment contracts, and states don't prohibit them from doing so. California has made a conscious decision that the economy overall works better if some kinds of private-sector contracts are prohibited, so it's restricted what can go into an employment contract to a greater degree than other states have (every state has some restrictions, e.g. in the modern era you can't sell yourself into indentured servitude, but some states are more restrictive than others).