Condemnation of all fornication was a novelty in the Christian religion. The Old Testament, like most codes of early civilization, forbids adultery, but it means by adultery intercourse with a married woman. This is evident to anyone who reads the Old Testament attentively.
Source: Marriage and Morals, 1929, by Bertrand Russell
More info.: https://russell-j.com/beginner/MM04-050.HTM