There's usually some kind of limitation. If Company A and Company B have such an agreement, and you leave company A and go to work for Company C, and then you leave Company C and want to work for Company B, the agreement between A and B should not preclude your doing so in that case. A can't prevent you going to work for B FOREVER, but B can be stopped from raiding A for employees.