Oxford professor Ewart Keep writes in a paper titled Market Failure in Skills (p. 3) that
For firms there is the problem of investment in staff who may leave taking their skills with them.
Some of the historical solutions to this problem involve limiting the mobility of the labor force, ranging from slavery, indentured servitude, and more recently some kinds work visas that are only valid for one employer.
So in this sense, some human rights are bad for markets, leading to certain kind of market failure. Is this view uncontroversial among economists? And a complementary question: can measures that limit worker mobility also result in other way in market failure?