Job was a married man who was neither a Christian nor a Jew. God testified on two occasions that he was the most righteous man of his day (Job 1:8; 2:3).
Job did not live in a Christian or Jewish country, and we have no evidence that Job lived under a theocracy. What Job therefore tells us should be the role of civil authorities is profoundly important for a biblical understanding of what civil governments should and should not do.
In Job 31:9-11, Job speaks of what he believed would be the case had he as a married man committed adultery with another woman:
Job 31:9 If mine heart have been deceived by a woman, or if I have laid wait at my neighbour’s door;
10 Then let my wife grind unto another, and let others bow down upon her.
11 For this is an heinous crime; yea, it is an iniquity to be punished by the judges.
12 For it is a fire that consumeth to destruction, and would root out all mine increase.
Job specified that his having relations with a woman other than his wife, including his neighbor’s wife, would have been a heinous crime. As a righteous man, Job believed and taught that adultery was a horrific crime.
Job also made known that he believed that adultery was an iniquity that was “to be punished by the judges,” which shows that Job believed that civil authorities would rightly punish any such adulterous relations that he would have had. Because Job did not live in a Jewish country and as far as we know, he did not live under a theocracy, his giving this teaching provides vital revelation for what righteous people are to believe that civil authorities in any nation should do with those who commit adultery.
Based on this revelation that preceded the giving of the Mosaic Law by many hundreds of years, we learn that the Bible teaches that adultery is a heinous crime that civil governments are to punish. The Bible does not teach that adultery is a sin but not a crime.