Hebrew and Abrahamic males took many wives (it was still allowable even in Jesus' time and polygamy was probably permitted and accepted but not as common in the early church).  It was also permitted to have concubines.   There was no "sacrament" of marriage until more recently.   Your historical and cultural understanding of "marriage" is quite weak and your understanding of the 6th commandment is also weak.  Adultery laws had to do with protecting women as "chattel" to be sold.