Note: the English word "slave" comes from the Hebrew ebed or amah -see here for insightful details
Anyone who beats their male or female slave with a rod must be punished if the slave dies as a direct result, but they are not to be punished if the slave recovers after a day or two, since the slave is their property. Exodus 21:20-21
Is the verse speaking about possession by ownership vs possession by debt contract?
Possession by ownership doesn't make sense. If the slave is his property [possession by ownership], then why is he punished if he kills his slave? [i.e. must be punished if the slave dies as a direct result]
But if this is possession by debt contract, then this does make sense. Certainly it provides no provision for killing, but the 2nd half makes sense since if a worker is out of action for 1–2 days then the owner has one less worker for that time. Any fine would be on top of the lost revenue from the non-working servant. And this seems to be an incentive not to impose corporal punishment willy-nilly, as the owner stands to lose financially.
And this makes significantly more sense when one considers the Anti-Return Law of DT X:X
Reading the "slavery" verse with the contextual lens of indentured servitude makes considerably more sense
Note: Even a free person could be physically punished:
“If there is a dispute between men, and they come into court and the judges decide between them, acquitting the innocent and condemning the guilty, then if the guilty man deserves to be beaten, the judge shall cause him to lie down and be beaten in his presence with a number of stripes in proportion to his offense. Forty stripes may be given him, but not more, lest, if one should go on to beat him with more stripes than these, your brother be degraded in your sight". Deuteronomy 25:1-3
Physical punishments for crimes or injuries, including floggings, branding and even mutilations, were practiced in most civilizations since ancient times.
Question: Why are you allowed to beat your slave as long as they don't die?
Based on the larger Old Testament context, it is safe to assume that slave masters were not allowed carte blanche authority to do whatever they wanted to their slaves. For instance, the Anti-Oppression laws:
“When a stranger sojourns with you in your land, you shall not do him wrong. 34 You shall treat the stranger who sojourns with you as the native among you, and you shall love him as yourself, for you were strangers in the land of Egypt: I am the Lord your God. [Leviticus 19:33-34]
You shall not oppress a sojourner. You know the heart of a sojourner, for you were sojourners in the land of Egypt [Exodus 23:9]
In Exodus 21, slave owners are limited in what they can do: if the master goes too far and the slave dies, the master will be punished. If the Old Testament Law is followed consistently, then the punishment for the slave owner might even include the death penalty for murder.
Of course, if a master beats his slave and the slave is unable to work for some time, the master has punished himself by losing the work he might have received from the slave. The implication here is that it is in the master’s best interest not to be too severe.