Not everything written down and claimed to be from God is, indeed, from God. Unreputable people have managed to insert themselves into "holy" works for ages upon ages now, and, if not in the works themselves, then certainly in our understanding of them.
That is why everything is weighed against love. And the vast majority of human beings -- especially so-called religious authorities -- utterly fail in that regard. Selfishness for money and power corrupt most everyone, and religion is rife for abuse by the unscrupulous.
Also, God's rules vary over the eons for different cultures and epochs.