Slavery occurs when some groups are denied any human rights and to eat, have accommodation and avoid physical and other punishment they must carry out work that the power figure wants done. Where liberty and basic needs for food, water and shelter are denied, the person has no choice but to comply or die.
In such circumstnaces enslaved people work and eventually lose the will to seek escape, especially when punishment is dire.