CS Lewis describes God as being outside of time. He can pick up a book for anyone of us and read any part of it - he knows our beginning, end and everything in the middle. It isn't that we don't do a lot to write the pages - but he is outside of time looking in. And so he can see all of time.
God told David, and Solomon, not to have but one wife. They each had hundreds of wives. This was not God's will. David still managed to have a heart that loved God and sought God. But, Solomon, the wisest man ever, sacrificed to false Gods. The wives tempted, successfully, to do horrible things.
There are times in the OT where God told the Israelites to kill everybody and they didn't. And there were repercussions. Bad things happened.
My take on the OT is that God knew that if A happened, B would follow. If B was damaging, but didn't mess up everything, then God let B happen. But if B would mess up everything - then God prevented B. He did this in a variety of ways, including slaughter at the hand of the Hebrews.
God is the same Yesterday, Today and Forever. I think the difference is that in this day and age, the interference that does the most good is loving interference. Healing, miracles, rescues. And there are documented miracles. Many of them.
But, I think that in the OT, that the people of the time just wouldn't have gotten it. They would have been running around making Golden calves, worshipping other Gods - oh, my goodness, even with the flood and the miracles in Egypt and.... they STILL did that. Well, then what would they have done without God's interference? Without His punishment?
Would they have had temple prostitutes like the pagans did? What would have happened?
God knows. And I think that is the whole reason. God does, and did, KNOW what would have happened otherwise. And he prevented it.
Shame and blame are the devil's tools. With God ALL things are possible.