Exodus 21:20-21
King James Version
20 And if a man smite his servant, or his maid, with a rod, and he die under his hand; he shall be surely punished.
21 Notwithstanding, if he continue a day or two, he shall not be punished: for he is his money.
21 Notwithstanding, if he continue a day or two, he shall not be punished: for he is his money.
The Bible refers to a number of laws meant to resolve issues where someone takes an action that puts them into certain predicaments. These references often started out using the term "if".
If a man commits A, then he should do B. And the only reason for the suggestion to do B is because he committed A. Had he not committed A, then he wouldn't have need to do B. But sometimes these verses get taken to imply that the act of committing A is justified.
Two parents allow their kid to stay home alone for the first time. They tell him "If you make a mess, clean it up". The having to clean up is conditional. The parents are not advocating making a mess. I'm sure they prefer he doesn't. But they are providing the solution, or the next step IF he should make a mess.
Many read this passage as an assumption that the law is trying to make it easy on the Israelites to beat their slaves by suggesting a very weak reference to a death penalty for killing a servant, and a quick out by suggesting the servant only need survive one or two days. And after 3 days if they die, the master would supposedly be free. So all the master need do is count the minutes to the 24th (or 48th) hour, and he is free!!!!
So the one or two days (24 or 48 hours) would be similar to the seven year law where if a criminal remains uncaught for seven years, right at midnight of the seventh year they are free.
But, this is not the case.
One question needed to be addressed, is why weren't they specific about the length of time before their freedom? Remember, if the servant dies, it's a death penalty for the master. Wouldn't you think something as important as one's life they should make it crystal clear how long they have to wait before they are safe from a death penalty? This law was meant to prevent abuse. Somehow it's being read as an encouragement.
They had judges back then. They also had methods for punishment designed to prevent death. Typically the head was to be avoided. So if the servant's head is bashed in, this would be taken into consideration. What they were trying to do was avoid wrongfully sentencing the master if the servant died from another cause. This would mean that there wouldn't be any visible evidence that the servant died from beating wounds. A bashed in head would make it fairly obvious that the servant was abused, and may have died directly from the blows.
So basically, again, the intent was to punish the master if the servant died as a result of the beating, and to avoid a false sentencing if not.