What is legal for a business to do in one state or at the federal level may not be legal in other places. Different states have different industries that they regulate in their own ways, resulting in a lot of confusion regarding employment and business law, especially when it comes to employment rights and contracts.
The inclusion of a non-compete agreement in an employment contract is relatively standard practice. Companies all over the country, including those that operate at the national level and those that operate in multiple states, have non-compete agreements in their standard employment contracts.
For businesses based out of California or the California division of a national company, state law regarding non-compete agreements could pose some problems if the company attempts to enforce that agreement through litigation at a later date.
California does not uphold any kind of non-compete agreement
Noncompete agreements typically benefit a company and do nothing to protect the workers who must sign them as part of their employment contract. Not only does a non-compete agreement pose a potential hardship for the person who signs it, but it also potentially stifles innovation and economic growth on a macro scale by preventing skilled and intelligent people from pursuing ideas due to a work contract.
In order to both protect the rights of workers and to incentivize innovation, California does not enforce non-compete agreements. Companies can include them in their employment contract as a means of deterring workers from seeking work with a competitor or opening a competing company, but the courts generally will not rule on the side of a business that attempts to enforce such an agreement later.