If the person is on a visa they can be deported if they walk away without another job. Lots of bad behavior ends up excused because of this risk. A similar situation where this can go on is student/advisor in phd studies, especially when there is no other advisor in the field they can switch to at a small university.
Laws regarding this are different from country to country. I know that the US laws are very biased towards the employer, and the employee gets to be put in a terrible situation.
Australia had laws like this in the past (thanks Liberal Party, you pricks), but they were being seriously abused and eventually rolled back. Abuse still happens though, just less of it.