If he came in by himself, he shall go out by himself: if he were married, then his wife shall go out with him.
If his master have given him a wife, and she have born him sons or daughters; the wife and her children shall be her master’s, and he shall go out by himself.
And if the servant shall plainly say, I love my master, my wife, and my children; I will not go out free:
Then his master shall bring him unto the judges; he shall also bring him to the door, or unto the door post; and his master shall bore his ear through with an awl; and he shall serve him for ever [Exod. 21:3–6].
"This remarkable law states that if a man is a slave, after seven years he can go free. If he was married when he became a slave, he can take his wife with him. If he married while a slave, that is, if he married a woman who was already a slave of his master, at the end of seven years he could go free, but his wife would still belong to the master. He could, however, if he loved his wife and master, decide to stay on his own free will. If he decides to stay, his master is to bore his earlobe through with an awl signifying that he will serve his master forever.
This is a beautiful picture of the Lord Jesus Christ. He came to this earth and took upon Himself our humanity. And we were all slaves of sin. He could have gone out free. He could have returned to heaven, to His position in the Godhead, without going through the doorway of death. He did not have to die upon the Cross. But He willingly came down to earth and took upon Himself our humanity. “And being found in fashion as a man, he humbled himself, and became obedient unto death, even the death of the cross” (Phil. 2:8)
Psalm 40:6–8 goes on to say, “Sacrifice and offering thou didst not desire; mine ears hast thou opened: burnt offering and sin offering hast thou not required. Then said I, Lo, I come: in the volume of the book it is written of me, I delight to do thy will, O my God: yea, thy law is within my heart.” This passage refers to Christ, because Hebrews 10:5–9 tells us that it does. It was fulfilled when our Lord came to this earth. “Wherefore when he cometh into the world [speaking of Christ], he saith, Sacrifice and offering thou wouldest not, but a body hast thou prepared me [it was not only his ear that was “digged,” or bored through with an awl, but God gave Him a body which He will have throughout eternity]: In burnt offerings and sacrifices for sin thou hast had no pleasure. Then said I, Lo, I come (in the volume of the book it is written of me) to do thy will, O God. Above when he said, Sacrifice and offering and burnt offerings and offering for sin thou wouldest not, neither hadst pleasure therein; which are offered by the law; Then said he, Lo, I come to do thy will, O God. He taketh away the first, that he may establish the second.” Christ was “made like unto His brethren.” He chose not to go out free without us. He could have left this earth without dying, but He said, “I love My Bride. I love the sinner.” So He became obedient unto death, even the death of the Cross so that He could redeem us from the slavery of sin. What a picture this is of Christ—placed right here after the giving of the Ten Commandments." McGee, J. V. (1991). Thru the Bible commentary: The Law (Exodus 19–40) (electronic ed., Vol. 5, pp. 34–36). Nashville: Thomas Nelson.