Christians today understand that the very central issue of the Gospel is Grace. The teachings of Jesus Christ left no doubt that pride had no place in the Kingdom of God, and there was no hope whatsoever that we would somehow earn our place in Heaven or work our way through our own efforts into eternal life with God the Father.
However, in order to understand Grace one must first understand the concept of a perfect God verses the concept of a sinful and imperfect man kind. But mankind did not understand that they were sinful. In fact even today as we are born into this world we do not understand that we are inherently, by our very nature, sinful and opposed to God, prideful and undeserving of eternal life, prone to ever making selfish, wrong and bad choices.
This was always the case. Mankind had to be taught what sin was. People who misunderstand the seemingly harsh God of the Old Testament do not understand the absolutely critical and foundational necessity that mankind must be instructed about sin before we could ever understand Grace.
The Gospel itself depends on it. Therefore the Jews, God’s chosen people, required a somewhat harsh and demanding task master, harsh enough and rigid and enough to bring an understanding to their relatively unschooled and simple minds about the dangers of that absolutely fatal human tendency towards sinfulness. And that is the story of the Old Testament. If they did not understood the perfection of God, and the unattainability of perfection by mankind (on our own efforts) then even the words of Jesus himself when he came would have fallen flat. They would have fallen on deaf ears