In the Old Covenant God commanded sacrifices & offerings but in Psalm 40 and Hebrews 10 God said that He does not desire such offerings and sacrifices that He commanded.
In John 8 a woman was about to be put to death for adultery as the law said to do in Leviticus 20:10 and Deuteronomy 22:22-24. Jesus did not condemn the woman.
If God did not desire the sacrifices He commanded in the law perhaps He did not desire other commands He gave in the law. Jesus is the exact representation of God so we are to look to him for the character of God. In John 8 Jesus did not desire to kill the woman even though the law said that is what should be done.
Often we try to justify the Old Covenant laws with logic but perhaps these laws were to speak to the people's hearts about the need for forgiveness. Jesus said the second greatest law was to "love your neighbor as yourself." If you were caught in sin that was punishable by death you would want to be forgiven. You would not want to have stones picked up by others to kill you. If you love your neighbor as yourself you wouldn't pick up stones to kill Him. You would instead say, "Lord have mercy on us all!" Ultimately in Jesus God did show us all mercy and He freed those who trust Him from the law and its penalties.
For those who think that the story from John 8 should not be in the scriptures based on it not being found in the earliest manuscripts consider that in John 4:18 Jesus knew the woman at the well's heart and revealed that she was an adulterer. He did not take the woman at the well and stone her! Jesus fulfilled the whole law yet He did not come into the world to condemn the world.
The Purposes of The Law & Its Punishments
What if The Story of 'The Woman Caught in Adultery' Never Happened? Examining John 7:53-8:11
The Devil Has the Power of Death