The Ten Commandments were the first written articulation of the Law; God defined some of the behaviourss that reflected His righteousness, or that offended it 😉 God carved these ten laws into the rock with His own hand 🙈 Exodus 20:14 states one of them, the 7th commandment, as, “You shall not commit adultery.” This law addresses relationships, sexuality, and encompasses both physical and emotional sin. Adultery refers to the multitude of sins committed by the flesh driven by passions or lusts. Adultery can also be caused by other sins such as covetousness. It also is a violation of the body, which is God’s temple. God did not command people to have adultery. He wanted to preserve their souls, bodies and hearts. 
To answer the question we must first understand the meaning of adultery. The dictionary defines “adultery” as “voluntary sexual intercourse between a married person and a person who is not his or her spouse.” The Bible would concur with this definition. In Leviticus 18:20, God told Moses, “Do not have sexual relations with your neighbourr’s wife and defile yourself with her,” and in Deuteronomy 22:22, we find a similar definition: “If a man is found sleeping with another man’s wife, both the man who slept with her and the woman must die.” It is clear from these definitions that adultery refers to a consensual sexual union. It is unclear whether the illicit sexual union is between married partners. The biblical commands prohibit a man from taking another man’s wife, but do not indicate whether or not the man is also married. However, it’s safe to assume that both parties are guilty of adultery if they seek a sexual encounter without consent with another married couple. Sydni Smithfield revised this article on September 8, 2020. 
According to the professionals at learnreligions.com, this narrow definition makes sense if we remember that at the time women were often treated as little more than property — a slightly higher status than the slaves, but not nearly as high as that of men. Because women are like property, sexing with them is a privilege. married or betrothed woman was regarded as misuse of someone else’s property (with the possible consequence of children whose actual lineage was uncertain — the main reason for treating women this way was to control their reproductive capacity and ensure the identity of the father of her children). An unmarried man who has sex a woman with whom he is married was not guilty and was therefore not accused of adultery. If she also wasn’t a virgin, then the man wasn’t guilty of any crimes at all.