When the children of Israel escaped from Egypt, Moses at first tried to resolve all disputes himself, but he became exhausted, so he handed the task over to judges within tribes and families. They just brought the difficult cases to Moses (Ex 18). I presume that Moses recorded some of the difficult cases in the Torah for their future reference. This explains the odd way that rules about different situations are jumbled together, particularly in Deuteronomy.

The Ten Words and the Laws for Society are contained in Exodus 20-23. These are the core of the covenant and the law. The rest of the rules in the Torah are mostly cases that were brought to Moses for resolution. Some of them are only applicable to the Israelites in their cultural situation, but others are still relevant today. They show how Moses interpreted and applied the Laws for Society.

Constraining Bad Behavior

Some of the rules in the Torah did not reflect God's will, but were given to deal with bad behaviour that he knew would occur. The people would copy immoral practices from the surrounding nations. God gave rules to limit the worst effects of these sins. He was not condoning the practices themselves, but preventing them from being too harmful.

For example, God gave the Israelites a system of government based on local judges applying God's laws. He did not want Israel to have a king like the surrounding nations. However, he knew that one day, the people would reject his way of government and decide to have a king, so he gave rules for the king. He was not condoning kingship. Rather, he knew that people would choose a king anyway, so he gave some rules to prevent the king from doing too much harm.

Collateral for Loans

When a person makes a loan, they sometimes demand the right to some assets as collateral that can be seized if the loan is not repaid. God urged people to make loans to the poor expecting nothing in return, so he did not approve the practice of demanding collateral from a poor person (see Interest below). However, he knew that some people would, so he gave rules to deal with it. People demanding collateral for a loan should still treat the borrower with respect.

When you make a loan of any kind to your neighbour, do not go into their house to get what is offered to you as a pledge. Stay outside and let the neighbour to whom you are making the loan bring the pledge out to you. If the neighbour is poor, do not go to sleep with their pledge in your possession. Return their cloak by sunset so that your neighbour may sleep in it. Then they will thank you, and it will be regarded as a righteous act in the sight of the Lord your God (Deut 24:10-12).

The lender must not go into a house to demand collateral. That would be intrusive for the household. Rather he is to remain outside and be polite and respectful.

Return their cloak by sunset so that your neighbour may sleep in it. Then they will thank you, and it will be regarded as a righteous act in the sight of the Lord your God (Deut 24:13).

Taking a cloak as collateral seems to be quite mean spirited. If a lender demands that, he must return it at sunset, so the person can sleep in it during the cold night. Of course, it would be better if the person were to lend without needing collateral. However, God knew it would sometimes be demanded, so he gave guidelines to protect his people from hardness of heart.

Productive equipment must not be taken as collateral for a loan.

Do not take a pair of millstones—not even the upper one—as security for a debt, because that would be taking a person's livelihood as security (Deut 24:6).

If a lender took productive equipment as collateral for a loan, it would prevent the debtor from earning a living and paying the loan back. God forbade this because it would keep the person poor. Productive equipment must not be taken as collateral.

Jealous Husbands

God does not condone the jealousy of husbands, but he recognises that it will occur. A woman whose husband becomes jealous is very vulnerable, so God put in place a process to protect them (Num 5:11-31). If a husband accused his wife of unfaithfulness, he must go to the priest. The priest would make the woman drink holy water, and pronounce a curse that only applied if she was guilty.

"If you have gone astray while married to your husband and you have made yourself impure by having sexual relations with a man other than your husband"—here the priest is to put the woman under this curse—"may the Lord cause you to become a curse among your people when he makes your womb miscarry and your abdomen swell. May this water that brings a curse enter your body so that your abdomen swells or your womb miscarries." "Then the woman is to say, "Amen. So be it." (Num 5:20-22).

This shifted power back to the woman, as the curse would only be fulfilled if two conditions applied.

A man who was not at peace with God would not have sufficient faith to ensure that the curse was fulfilled. So in most situations, nothing this would happen. The process would show most wives to be innocent.

This was the opposite of the process in the surrounding nations. They had laws that required the women to get a miracle to prove her innocent. That was too hard for most women, so they were presumed to be guilty if nothing happened. That was unfair. Moses reversed the process to provide protection for women.

Kings

Kings are not God's will. He allowed Israel to have a king when the people demanded one, but he explained that this was not his will. Samuel explained that kings are a sub-optimal option (1 Sam 8). Kings would rob and steal from the people. They would prevent them from getting justice.

There is no executive power in the laws of Moses. No role is established for a king. Yet God knew that the people would choose to have kings, so he provided instructions for kings to restrain the worst of their behaviour (Deut 17:14-20). The king must not accumulate offensive weapons, because then they will be keen to go to war (Deut 17:16). Foreign wives must be avoided, because they would bring powerful evil spirits with them (Deut 17:17). A king must not accumulate wealth, because that would harm his people (Deut 17:17).

Kings and political leaders are a second best option for God's people. He understood that people would often choose second best, so he gave rules to limit the harm that kings can do.

The Redeemer of Blood

God's law recognises the role of the Redeemer of Blood, even though it does not condone what they do. The Redeemer of Blood is a family member of a person murdered who seeks revenge on behalf of their dead relative. The law puts in a whole lot of protection for murders to stop a Redeemer of Blood from taking action that they might later regret (Num 35:6-33; 19:1-3).

The purpose of these processes is to prevent an innocent person from being killed unnecessarily for the sake of revenge.

The principle of justice remains. The law says that if a Redeemer of Blood kills a murderer, the murder's blood shall not be on his hands.

If the avenger of blood kills the manslayer, he shall not be guilty of blood (Num 35:27).

A murderer had taken a life, so justice means that he deserves to lose his life. Death is what a murderer deserves. Therefore, if a redeemer of blood kills a murderer, he cannot be charged with murder. However, killing a murderer is not God's will. While justice allows it, God does not want "life for life" enforced. His penalty for murder is exclusion from the community (see Restitution and Exclusion). God does not want his people getting into tit for tat murders that lead to family feuds.

If a redeemer of blood kills the murder, justice is satisfied, but this is not ideal. God prefers better justice with witnesses, ransom, and exclusion of murderers from the community. However, God recognises the reality of human nature. That means redeemers of blood will arise, but God put in place processes to prevent them from doing harm, and creating guilt for themselves. It is better to make peace with the murderer's family and restore peace.

God warns that innocent blood pollutes the land and prevents it from producing good crops (Num 35:33-34). He provided a way for the priests to cleanse the land when a murder occurs and the guilty person is not discovered or captured (Deut 21:1-9). This ensures that the Spirit of Violence does not get a place to control. We can do the same by commanding evil spirits to leave in Jesus name.

No Military Rape

God repeatedly told the Israelites that they must not take wives from among the inhabitants of Canaan. However, God knew that this would sometimes happen, so he put in place rules to protect the women captured.

If you notice among the captives a beautiful woman and are attracted to her, you may take her as your wife. Bring her into your home and have her shave her head, trim her nails and put aside the clothes she was wearing when captured. After she has lived in your house and mourned her father and mother for a full month, then you may go to her and be her husband and she shall be your wife. If you are not pleased with her, let her go wherever she wishes. You must not sell her for money or treat her as property, since you have humbled her (Deut 21:10-14).

Taking a foreign wife was not God's will, but he knew it would happen, so he provided protection for the women.

This law prevents the rape of women captured in battle, as has been common throughout history. Captive women are to be treated with respect, even if they are enemies. This is another example of loving your enemy.

If the man changes his mind during the month and decides not to marry the woman, he must still treat her well. She must be allowed to go anywhere she pleases and join any household that will welcome her. She must not be sold for money. She must not be sold as a slave.

Polygamy

God's will is for a man and a woman to be married to each other (Matthew 19:4-6). That is his ideal However God realised that men would sometimes take more than one wife. Jacob had done this. He permitted polygamy, but it was not the ideal.

Polygamy would be justified in a time of war, because if a large number of men were killed, many women would not be able to find husbands. Being a single woman not attached to any household was a vulnerable situation. Some would choose to marry a man who already had a wife to get the protection that comes from belonging to a strong household.

God allowed polygamy, although it was not ideal. So he also provided a rule to control it. He required the husband to love each wife equally, but he knew that was not realistic.

If a man has two wives, and he loves one but not the other, and both bear him sons but the firstborn is the son of the wife he does not love, when he wills his property to his sons, he must not give the rights of the firstborn to the son of the wife he loves in preference to his actual firstborn, the son of the wife he does not love. He must acknowledge the son of his unloved wife as the firstborn by giving him a double share of all he has. That son is the first sign of his father's strength. The right of the firstborn belongs to him (Deut 21:15-17).

The man must treat well the wife he does not love as much. He must not deprive her children of their rights.

In Hebrew culture, the first-born son got a double portion, because he was responsible for caring for his parents when they got old (this was not mandated by the law). The man who had stopped loving his wife must treat her children in the same way as other children.

God permitted polygamy, because he understood that it would occur, but he knew it is impossible for a man to love to wives equally. So he proved instruction that the man must treat both wives well.

Body Hung on a Tree

Deuteronomy 21:22-23 contains a strange instruction about a body hanging on a tree.

If someone guilty of a sin deserving death is put to death and their body is exposed on a pole, you must not leave the body hanging on the pole overnight. Be sure to bury it that same day, because anyone who is hung on a pole is under God's curse (Deut 21:22-23).

God does not want people deserving of death to be killed. His penalty for death is exclusion from the community. There was no law that specified death on a pole as a penalty for any crime.

This ruling was not relevant to the Israelites, but prophetic. The passage looked forward to the death of Jesus. God gave this command so that when Jesus was crucified on the cross, he would be taken down and buried in a tomb, so the resurrection could take place in secret. Moses was prophesying the death and resurrection of Jesus.

Forty Lashes

The law of Moses puts limits on the number of strikes that may be given to a person who is beaten. The interesting fact is that beating is never specified in the Law of Moses as a penalty for any crime. However, God recognises the hardness of human hearts. He presumed that the people would sometimes demand that a criminal be beaten, and weak judges would give in to them. To deal with this hardness of heart, God puts a limit on the number of lashes that a man being punished could be given.

If a wicked man becomes a son of beating, the judge will cause him to lie down and be beaten in his presence, according to his guilt, with a certain number of blows. Forty blows he may give him and no more, lest he should exceed this and beat him with many blows above these, and your brother be humiliated in your sight (Deut 24:2-3).

The expression "son of beating" is strange. Most translations ignore the puzzle and assume that it means the wicked man deserves beating. I suspect that it means that the beating is not legal.

God does not approve of people being beaten for their crimes. However, he put a limit of forty lashes that a person could be given. He knew that people would ignore his instructions not to beat people. However, he also knew that if he put a reasonable limit in place, this might restrain the worst of illegitimate beating.

This is an example of rules to limit the worst effects of bad behaviour. Beating criminals is unlawful, but inevitable in a fallen world, so God graciously tries to put a limit on it, while not condoning it. He deals with us as we are, not as we should be.

Weak Interpretation

Some rulings are misunderstood because they are translated and interpreted badly.

Keeping Families Together

God wants to keep families together. Moses explained what would happen to the family of a bonded servant. This was not a slave, but a person who had bonded themselves to another household in return for the payment of a debt. The person was required to work for seven years, or until the amount owed was repaid.

If you buy a Hebrew servant, he is to serve you for six years. But in the seventh year, he shall go free, without paying anything. If he comes alone, he is to go free alone; but if he has a wife when he comes, she is to go with him. If his master gives him a wife and she bears him sons or daughters, the woman and her children shall belong to her master, and only the man shall go free.
But if the servant declares, "I love my master and my wife and children and do not want to go free," then his master must take him before the judges. He shall take him to the door or the doorpost and pierce his ear with an awl. Then he will be his servant for life (Ex 21:2-6).

If the man was married when he became a bond servant the situation was simple. His wife and children should go free with him.

The situation was more difficult if the person he was serving had provided him with a life. The man became a bond servant because he did not have any money. A man who was getting married paid a dowry to the father of his bride, who held it in trust for her. This would provide for her support if her husband betrayed her. A man in debt would not be able to pay the dowry needed to obtain a wife.

If the bond servant took a wife, the bond holder must have paid the dowry on behalf of the servant, so he was committed to caring for the wife until the bond servant could prove that he could support her. He could choose to work for the dowry, as Jacob did (seven years for Rachael). If he did not want to do this, he could decide to be permanently attached to the household where he had found his wife. This would keep his family together and give him a good life.

I am not sure what the hole in the ear meant. The man would not be a bond servant because he would then have to be released after seven years. He was more like a family member, but without any right to an inheritance.

Grabbing the Balls

Deuteronomy 25:11-12 is a humdinger. This is probably the harshest passage in the Torah, but this is due to bad translation and interpretation. A woman who intervenes in a fight between her husband and another man gets her hand cut off.

There are several problems with this interpretation. It seems to be based on the woman struck by two men fighting, but there is no "like for like" (Ex 21:22-23). The Torah does not authorise cutting of hands.

There are several keys to understanding this passage.

God is simply saying that they should remove the woman's hand and not be concerned about her.

If a man is fighting her husband, it is normal for a woman to be upset and intervene. It would be natural to go for his testicles in an attempt to cripple him and protect her husband. However, this action would not be very helpful and would just increase the tension between the men.

The most sensible action the people could take would be to remove her hand and not give any consideration to punishing. She acted from love, even if unwisely.

Physical Disability

A command about priests with physical disabilities has been misunderstood.

For the generations to come none of your descendants who has a defect may come near to offer the food of his God. No man who has any defect may come near: no man who is blind or lame, disfigured or deformed; no man with a crippled foot or hand, or who is a hunchback or a dwarf, or who has any eye defect, or who has festering or running sores or damaged testicles. He may eat the most holy food of his God, as well as the holy food; yet because of his defect, he must not go near the curtain or approach the altar, and so desecrate my sanctuary. I am the Lord, who makes them holy (Lev 21:16-20,23-24).

God did not create people with physical disabilities. The defects are the work of the spiritual powers of evil. They gained access when the people lost spiritual protection. The works of the spiritual powers of evil are not allowed into the presence of God.

God was quite happy for these people to eat the "holy food of God." He did not shut them off from his blessing. He was delighted to bless people with disabilities, but the wanted people understand that he does not cause them.

Exclusion of Spiritual Evil

God specified groups of people that should be excluded from the community.

An Ammonite or Moabite shall not enter the assembly of the Lord; even to the tenth generation none of hisdescendantsshall enter the assembly of the Lord, because... they hired against you Balaam the son of Beor from Pethor of Mesopotamia, to curse you (Deut 23:3-4).

The Ammonites and Moabites had cooperated with the spiritual powers of evil, so they were not allowed to be part of the covenant community for at least ten generations. If they were brought in, they would bring spiritual evil with them.

Although the Egyptian had treated them badly, they were not to despise them, because the ordinary people were slaves of political and spiritual power too.

Do not despise an Egyptian, because you resided as foreigners in their country. The third generation of children born to them may enter the assembly of the Lord (Deut 23:7-8)

After three generations, the people fleeing from Egypt would be welcome, because by then the victory of God should be established in the promised land, and ready to accept refugees.

In Old Testament times, the only way to deal with evil spirits was to stay away from the people who carried them. Exclusion provided protection. Since Jesus' victory on the cross, we no longer need to stay away from people who carry an evil spirit, as we can bind them in Jesus' name. Jesus urged his people to go amongst sinners and people bound by evil spirits and share his love, because he has provided spiritual protection that can keep us safe.

Good Stuff

Moses recorded several cases that are examples of good behaviour that fulfils the laws of society. Some of his rulings are really good advice that people who are poor and weak.

Love your Enemies

Many Christians believe that the Torah said that people should do harm to their enemies. That is not true. When Jesus said we should love our neighbour as ourselves, not making a new rule, he was actually quoting Leviticus.

Do not seek revenge or bear a grudge against anyone among your people, but love your neighbour as yourself. I am the Lord (Lev 19:18).
The stranger who dwells among you shall be to you as one born among you, and you shall love him as yourself (Lev 19:34).

Moses gave some cases illustrating what it means to love your enemies.

If you come across your enemy's ox or donkey wandering off, be sure to return it. If you see the donkey of someone who hates you fallen down under its load, do not leave it there; be sure you help them with it (Ex 23:4-5).

When someone is in trouble in their work, we must come to their assistance. We must do this even if they are our enemy or if they hate us.

We must care for the property of other people.

If you see your fellow Israelite's ox or sheep straying, do not ignore it but be sure to take it back to its owner. If they do not live near you or if you do not know who owns it, take it home with you and keep it until they come looking for it. Then give it back (Deut 22:1-2).

We are to protect God's creation.

If you come across a bird's nest beside the road, either in a tree or on the ground, and the mother is sitting on the young or on the eggs, do not take the mother with the young. You may take the young, but be sure to let the mother go, so that it may go well with you and you may have a long life (Deut 22:6-7).

A person building a house must make it safe for people who visit.

When you build a new house, make a parapet around your roof so that you may not bring the guilt of bloodshed on your house if someone falls from the roof (Deut 22:8).

Mistreating Widows and Orphans

God warned what would happen if the people mistreated widows and orphans.

Do not take advantage of the widow or the fatherless. If you do and they cry out to me, I will certainly hear their cry. My wrath will be aroused, and I will kill you with the sword; your wives will become widows and your children fatherless (Ex 22:22-24).

When the people stop showing mercy, they lose their spiritual protection. God withdraws, and the spiritual powers of evil are able to attack. It is not God who destroys wives and children. It is actually the spirit of wrath that will destroy them. Sin allows them to break through the spiritual protection of the people.

No Slavery

God provided protection for servants who had escaped from their situations.

If a servant has taken refuge with you, do not hand them over to their master. Let them live among you wherever they like and in whatever town they choose. Do not oppress them (Deut 23:15-16).

This is a radical command. Some commentators say that it applied to slaves escaping from pagan masters, but there is no indication of that in the text. This command actually applies to all servants, and even servants who have bonded them in return for settlement of debt.

This is a radical command. It means that no servant can be held against their will. All service must be voluntary. This rules out all forms of slavery. If a servant chooses to flee his or her master, they must be allowed to go. This is the case even if the master has settled a debt for the servant. This is why Jesus said to lend expecting nothing in return (Luke 6:35). He was repeating this principle from the law.

In a household-based society, belonging to a good household was a huge benefit. Most servants would choose to stay with their household for the benefits, provided they were treated well. However, if they felt they were being treated badly, they were free to leave. This is confirmed in Ex 21:26-27, which says that a servant who is injured must be set free from their financial bond to a household.

A bonded servant would usually stay with the household, because they were grateful for having their debts settled. However, the person paying the debt in return for the bond of service would have no guarantee that the servant would work the full seven years. Settling a debt under these conditions was very risky. That is what the law meant by loving your neighbour.

This ruling has been mostly ignored. It is important because it makes slavery impossible. All work relationships must be voluntary.

If a servant flees to a community, the people of that community must let the person live among them. They must not force them to return. They must not oppress them or take advantage of them.

Economic Generosity

We must not abuse the property of other people

If you enter your neighbour's vineyard, you may eat all the grapes you want, but do not put any in your basket. If you enter your neighbour's grain field, you may pick kernels with your hands, but you must not put a sickle to their standing grain. (Deut 23:23-25).

The earth belongs to the Lord, so crops come from him. We must be willing to share our crops with others. A person visiting may pick a few grapes or grains, but they must not be greedy and use harvesting tools. This balances generosity and fairness.

An animal that is working must be allowed to eat from the crops.

You shall not muzzle the ox while he is threshing (Deut 25:4).

People must be kind to their animals. The same promise applies to humans. People who are working must be fed well by their employer.

When a person is poor, they must be paid for their work at the end of every day, so that they can buy food to feed themselves.

Do not take advantage of a hired worker who is poor and needy, whether that worker is a fellow Israelite or a foreigner residing in one of your towns. Pay them their wages each day before sunset, because they are poor and are counting on it. Otherwise, they may cry to the Lord against you, and you will be guilty of sin (Deut 24:14-15).

An employer must pay an employee sufficient wages for them to provide for their families. If need be, they must pay them at the end of the day, so they can buy food for their family.

Interest

The law forbade the Israelites from charging interest to other members of their community.

Do not charge a fellow Israelite interest, whether on money or food or anything else that may earn interest. You may charge a foreigner interest, but not a fellow Israelite, so that the Lord your God may bless you in everything you put your hand to in the land you are entering to possess (Deut 23:19-20).

God would bless his people with property, so most of the loans made to fellow Israelites would be to people who were poor. Giving them a loan with no interest charge was a good way of helping them. The loan was limited to seven years, so if it was not repaid it, the debt would be cancelled (Deut 15:1). This is another example of lending expecting nothing in return (Luke 6:35).

Foreigners could be charged interest because these were business loans. God had promised that if the Israelites were faithful to him, they would lend to the nations and not need to borrow from them (Deut 15:6).

The interest laws created a radically different economic system. This is a much bigger topic than can be covered here.

Honest Weights and Measures

Dodgy weights and measures are a common form of fraud.

Do not have two differing weights in your bag—one heavy, one light. Do not have two differing measures in your house—one large, one small. You must have accurate and honest weights and measures, so that you may live long in the land the Lord your God is giving you. For the Lord your God detests anyone who does these things, anyone who deals dishonestly (Deut 25:13-16).

People who buy and sell are to have honest weights and measures. God hates the common practice of cheating in trade.

Cleanliness and Hygiene

If the people remained faithful to God, he would prevent them from getting ill.

If you listen carefully to the Lord your God and do what is right in his eyes, if you pay attention to his commands and keep all his decrees, I will not bring on you any of the diseases I brought on the Egyptians, for I am the Lord, who heals you (Ex 15:26).

God would protect his people, but he also knew that he the people would wander from him and encounter sickness. He provided hygiene rules to protect them from unnecessary harm.

The people were to bury their excrement while they were in the wilderness.

Designate a place outside the camp where you can go to relieve yourself. As part of your equipment have something to dig with, and when you relieve yourself, dig a hole and cover up your excrement (Deut 23:12-13).

If developing cities had applied this rule, many lives would have been saved.

God also provided quarantine rules to prevent infectious diseases from spreading amongst the camp (Leviticus 13-15).

Vows

Words are really important. God takes vows seriously because they release the angels and the spiritual powers of evil.

If you make a vow to the Lord your God, do not be slow to pay it, for the Lord your God will certainly demand it of you and you will be guilty of sin. But if you refrain from making a vow, you will not be guilty. Whatever your lips utter you must be sure to do, because you made your vow freely to the Lord your God with your own mouth (Deut 23:21-23).

Words have power. God created the universe by speaking words. Our words have power too. They give the angels and the spiritual powers of evil permission to act. We must be careful not to say things that we do not want them to do. If we say we will do something, then we must do it (Num 30:2).

Some women are much more open to the spiritual realms. This is usually a really good thing, but it does leave them vulnerable to attack by the spiritual powers of evil God provides protection by allowing fathers to nullify the unwise vows of their daughters.

When a young woman still living in her father's household makes a vow to the Lord or obligates herself by a pledge and her father hears about her vow or pledge but says nothing to her, then all her vows and every pledge by which she obligated herself will stand. But if her father forbids her when he hears about it, none of her vows or the pledges by which she obligated herself will stand; the Lord will release her because her father has forbidden her (Num 30:3-5).

God protects a young woman from the spiritual powers of evil by allowing her father to nullify words that are unwise. The same applies to husbands and wives.

If a woman living with her husband makes a vow or obligates herself by a pledge under oath and her husband hears about it but says nothing to her and does not forbid her, then all her vows or the pledges by which she obligated herself will stand.But if her husband nullifies them when he hears about them, then none of the vows or pledges that came from her lips will stand. Her husband has nullified them, and the Lord will release her (Num 30:10-12).

This is important for spiritual protection. Being open to the spiritual realms is usually really helpful. If it leads to deception by evil, God gives a woman's husband authority to nullify it, and prevent them taking advantage of her words.

Prophets

The law was not God's complete revelation. God promised that he would raise up prophets to speak to the people when they needed to hear from him.

I will raise up for them a prophet like you from among their fellow Israelites, and I will put my words in his mouth. He will tell them everything I command him. (Deut 18:18-19).

The ultimate prophet was Jesus. However, before and after him, God will never leave his people without a prophetic voice.

Protecting Marriage

God intends that husbands should put energy into making their marriage strong.

If a man has recently married, he must not be sent to war or have any other duty laid on him. For one year he is to be free to stay at home and bring happiness to the wife he has married (Deut 24:5).

A man who had just got married must not be given additional duties. He must devote the first year to the happiness of his wife. God holds husbands responsible for the happiness of their wives.

No Cult Prostitution

Most ancient religions had prostitutes attached to their temples. God forbade this for his people.

No Israelite man or woman is to become a shrine prostitute. You must not bring the earnings of a female prostitute or of a male prostitute into the house of the Lord your God to pay any vow, because the Lord your God detests them both (Deut 23:17-18).

God detests prostitution. He did not want prostitution associated with his tabernacle. This was also a good protection for young women.