When we become a Christian, but our marriage partner doesn't, they may leave and the marriage will be over. Many Christians would be utterly shocked if they read Exodus 21 v 4. Not only does it refer to the concept of slavery in God's law, but it says that if a servant is given a wife by his master, and his period of service comes to an end, that if he leaves his master, as he is entitled to do, that he has to leave his wife also, because she belongs to his master. And to make it worse, this is the first reference in any Biblical law to marriages coming to an end. This seems to transport us into another world, but can easily be avoided because slavery is generally a thing of the past.
Biblical slavery is different from the modern conception.
Sometime it was closer to a fixed-term contract, and very different from the abusive type of slavery seen in the early days of the United States. While it was open for the servant to stay with his master, and therefore keep his wife and children, he didn't have to, and there was no criticism if he didn't. In fact, if he had to stay with any wife his master gave him, there would be no need for this law. This scripture kills off any idea that marriage is indissoluble and permanent. People cannot blame Moses for what is clearly here represented as God's command, and God clearly allows a man to leave his wife to gain his freedom, and for the wife to become his former master's.