Isaiah 50:1makhar
This is what the Lord says: "People of Israel, you say I divorced your mother. Then where is the paper that proves it? Or do you think I sold you to pay a debt? Because of the evil things you did, I sold you. Because of the times she turned against me, your mother was sent away.
God says Israel was sold because of their sins.
Exodus 22:2makhar
The robber who is caught must pay back what he stole. If he owns nothing, he must be sold as a slave to pay for what he stole. If the stolen animal is found alive with the robber, he must give the owner two animals for every animal he stole, whether it was a bull, donkey, or sheep. If a thief is killed while breaking into a house at night, the one who killed him is not guilty of murder. But if this happens during the day, he is guilty of murder.