If you have a reference or link, that would be very helpful for the future...
I appear to be incorrect in that and suspect they were lower court rulings. I think some of the first challenges were from "Hollywood Starlets" who were under contract with studios not allowing them to take roles in other studio movies when their studio was only offering them minimum roles. I must have assumed that there was a higher court ruling since I haven't heard of contracts such as that from reputable companies for lower level employees.
In my case when my division was sold to another company, the agreement stated that I would get a 6 month bonus on sale and another 6 month bonus after one year if I was still with the company or was laid off prior to that. There was nothing in the agreement that committed me to remain at that company even for one day.