You asked how can the Israelites become the object of God's wrath. The reason is, though they were physically delivered out of Egypt, their hearts were still unregenerate and were still the object of God's wrath. They still had a wrong spirit controlling them. As Keith Green once said (paraphrase), "They may have delivered from Egypt, but their hearts have still not been delivered out of Egypt." Like many preachers ask, "How many people entered into the Promise Land?" The answer was 2: Joshua and Caleb. In the Book of Numbers 14:24, it reads that Caleb had a different spirit and he wholeheartedly followed the LORD. This shows that he was a regenerated by the grace of God and therefore was able to enter the Promised Land with Joshua.
This is why in Deuteronomy 5:29, The LORD cried out about Israel, "Oh that they had such a heart in them, that they would fear Me and keep all My commandments always, that it may be well with them and with their sons forever!" Israel did not have that heart. They were originally rebellious. They had no heart for God and no heart to keep His commandments. And then later on in Deuteronomy, Jeremiah, and Ezekiel, God answers His own cry with the solution of regeneration:
"And the Lord your God will circumcise your heart and the heart of your offspring, so that you will love the Lord your God with all your heart and with all your soul, that you may live." -Deuteronomy 30:6
"For this is the covenant that I will make with the house of Israel after those days, declares the Lord: I will put my law within them, and I will write it on their hearts. And I will be their God, and they shall be my people.And no longer shall each one teach his neighbor and each his brother, saying, Know the Lord, for they shall all know me, from the least of them to the greatest, declares the Lord. For I will forgive their iniquity, and I will remember their sin no more. -Jeremiah 31:33-34
"I will make with them an everlasting covenant, that I will not turn away from doing good to them. And I will put the fear of me in their hearts, that they may not turn from me." -Jeremiah 32:40
"I will sprinkle clean water on you, and you shall be clean from all your uncleannesses, and from all your idols I will cleanse you.And I will give you a new heart, and a new spirit I will put within you. And I will remove the heart of stone from your flesh and give you a heart of flesh.And I will put my Spirit within you, and cause you to walk in my statutes and be careful to obey my rules." -Ezekiel 36:25-27
God put them through 40 years in the desert in order to show them how wicked their hearts were. That's why the only way for a person to be saved is the supernatural grace of God, where God takes our rebellious hearts and crucifies it, and gives us a heart that grows in conformity to Christ. That heart will never grow hard, but only softer by God's grace. Repentance, faith, holiness, love for God, and surrender will grow. This is why Christ Himself stressed the importance of being born again. Without the working of the Spirit in a person's heart and mind, that person cannot enter the kingdom of God (John 3:3-6). God will not allow people who are slaves of sin to enter into His presence for eternity (1 Cor. 6:9-10, Hebrews 12:14). I hope this answers your questions. I pray that the LORD encourages you through this Brother.
God help us all.....
Your Servant in Jesus' Name,
- Michael Liao