So are you implying that the 10 commandments are the extent of God's moral code?
Not at all.
Jesus affirmed the 10 commandments, but he also told us to treat others as we would want to be treated, to love our neighbours as ourselves and to forgive our enemies.
If not, then me thinks that the examples set in the OT stand in pretty stark contrast to the "love thy neighbor" commandment proclaimed in the NT.
Of the 10 commandments, the final 6 are about loving your neighbour. People who stole from their neighbours, or committed adultery with other men's wives had to atone and pay compensation. They lived in a community; those who sinned against the community were punished, and if the community sinned, sacrifices had to be offered.
This was God's law and what he intended. But, as today, people didn't keep it. They let their feelings and desires take over, they did what they wanted because they didn't honour God. Some of them even committed incest.
Jesus said that they had been taught "an eye for an eye ...." to try to prevent extreme revenge. For example, a daughter gets raped and, as punishment, the rapists entire family gets wiped out - which was what was happening in some cases.
It's not, and never was, God's law that's wrong - it's that people don't believe in/honour God and don't want to keep it.
Certainly today there is a "don't tell me what to do/the Bible's old fashioned/God's not real, I am in control", type attitude.