In California, unlike many states, a contract clause or term (or “covenant”) that requires an employee not work in a way that competes with a prior employer is unenforceable or illegal. So if an employee works at Coca Cola, he can leave and go work for Pepsi, even if there is a contract signed by the employee saying that he will not leave and go work for a competitor.
There are some exceptions. The former Coke employee cannot provide Pepsi with confidential information or trade secrets. Also, there are some very narrow exceptions regarding the sale of a corporation that don’t apply to the vast majority of employees.