Exodus 22:
7 And if a man sell his daughter to be a maidservant, she shall not go out as the menservants do.
8 If she please not her master, who hath betrothed her to himself, then shall he let her be redeemed: to sell her unto a strange nation he shall have no power, seeing he hath dealt deceitfully with her.
9 And if he have betrothed her unto his son, he shall deal with her after the manner of daughters.
10 If he take him another wife; her food, her raiment, and her duty of marriage, shall he not diminish.
11 And if he do not these three unto her, then shall she go out free without money.
In Biblical days, sons and daughters were treated differently. If a man had children, he had servants for life.
If a man had a son, he had someone to leave his inheritance to. He had hope for the future of his family.
If a man had a daughter, he had a treasure that he could invest in. He could trade her for favors and connections that could benefit his family's future.
At any rate, the patriarch of the family ruled over his progeny. It didn't matter what country he lived in, his family was his to rule over and control. If you want to hurt a man, destroy his family.
Now days, at least here in the United States, things are different. The government has done everything possible to destroy the authority a family has over an individual. This may, at first glance, seem like a good thing in some ways, but is it how God intended it?
In this case, if a man owed a debt and decided to sell his daughter to the person he owed the debt to, then his daughter "belonged" to the person he sold her to for life.
She would be used in any manner a master saw fit to use her. If the master did not get on well with her, the man had the option of buying her back, but the master could not sell her to another nation. If the man did not buy her back, the daughter would have to suffer her fate in the master's hands, and that may not be good. So daughters who were sold into servanthood were taught from an early age to be the best servants they could be for anyone to avoid any future problems for the family.
If a master bought the daughter and then introduced her to his son for a future union, he was responsible to treat her as if she were his own daughter, not a servant that he gave away.
If the master chose to sexually use her, she was then to be treated as his wife. And if he married someone else, he was still to treat her as he would a wife, providing for her and allowing her to raise her children by him.
If a master buys the daughter of a debtor, and he doesn't sell her back to her father, give her to his son, or take to him as a wife, then she is to be set free to survive on her own. This can be a tricky situation for women, who only had one way of surviving back in those days, unless they begged on the streets and were able to somehow buy property of their own, which was mostly impossible.
In our neck of the woods, buying and selling servants is not allowed. So, if we were to edit this to our standard, here is how it would look:
If a man owed a debt but could not work for it, he could offer to let his daughter work out the debt for him.
If an employer accepted that offer, he could not contract her to another employer in order to work out his OWN debt. And, if a man were to somehow come into some money and was able to pay off his debt, she would be free from her contract.
If she and the employer's son fell in love and got married, she would not be under contract any longer, and she would then be a part of the employer's family.
If the employer married her, then he would treat her with the respect any wife deserves.
If the employer was not pleased with the work she was contracted to do, then he could tear up the contract and no one would owe him anything. At any rate, it is up to the employer whether to accept the deal.