2 If a thief be found breaking up, and be smitten that he die, there shall no blood be shed for him.
3 If the sun be risen upon him, there shall be blood shed for him; for he should make full restitution; if he have nothing, then he shall be sold for his theft.
These verses explain the laws relating to a burglar. The phrase “breaking up” is more often translated as “breaking in,” meaning the thief is coming directly into one’s home to commit his foul deeds.
A burglar presents far more danger than a thief who picks a pocket or grabs something unattended on the streets. Breaking into a home in the dead of night significantly raises the likelihood of encountering the victim in his most vulnerable position, and so deadly force is more likely to transpire. Accordingly, the law states that a man who strikes a burglar such that he dies shall have no punishment upon him, so long as this did occur in the night. Verse 3 states that if the burglary occurs in the day, lethal force against the intruder is not permitted, presumably as the situation is far less uncertain and dangerous.
If, however, the daytime burglar is captured, there will still be a punishment upon him. As with the prior laws of theft, he must return what he stole twofold. Of course, the man may not be able to pay that fine. He may be able to return what he stole, but not the same value again a second time. In such an instance, we are told that “he shall be sold.” Presumably this means that he will be sold as a servant, but the payment that would normally go to him or his family for his service will instead be given to his intended victim. If he is an Israelite, or converts to the Israelite faith, presumably he will be freed after six years as per the previously stated laws.
I would imagine one side-effect of the Mosaic legal system is that there was much less need for prisons than in our current system. Murderers were put to death, and thieves were only fined, or else served their time as servants in other households.