It is very common in IT (I guess, in all other sectors too) to switch the jobs after few years if not months and get a better remuneration.
I have heard about a friend who works in IT and switched to a different company to work on a similar profile. In her new job, she was allocated to a project where she had to work for the same client for which she worked in previous company.
Her previous employer (manager), contacted the HR in her new company and made sure that she can't work for the same client for at least 6 months.
Fortunately, she got another project with another client.
I am wondering what would have happened if there were no openings with any other client?
Would she have to be on bench until another project opportunity knocks?
Did she has any Legal Rights to continue the work with the same client?
It could have been stipulated in the employment contract your friend had signed with the former employer. In it, there might have been non-compete clause that specifies she cannot work with their clients for a period of time etc.