God does not always intervene in life.
Why did God allow the Israelites to suffer all those years? We do not understand why God does not always act. Perhaps it has something to do with free will. If God always changes history, then mankind would not have free will. Perhaps it has something to do with the sin of Adam and Eve. They decided to do things their own way instead of what God told them. Because Adam and Eve understood they were wrong when they disobeyed God, God made a provision for them and humanity based on limited involvement from Him. After their sin, their situation changed. Men would have to toil hard and women would suffer through childbirth.
Even though God does not always act when something goes wrong, God is just, and He will punish those who bring evil into the world through sin and reward those who follow His commandments. Daniel 12:2 NKJV says, "And many of those who sleep in the dust of the earth shall awake, some to everlasting life, some to shame and everlasting contempt." Rabbi Kefa had a lot to say about those who live in sin.
2 Peter 2:13-17 NKJV says,
They are spots and blemishes, carousing in their own deceptions while they feast with you, having eyes full of adultery and that cannot cease from sin, enticing unstable souls. They have a heart trained in covetous practices, and are accursed children. They have forsaken the right way and gone astray, following the way of Balaam the son of Beor, who loved the wages of unrighteousness; but he was rebuked for his iniquity: a dumb donkey speaking with a man's voice restrained the madness of the prophet. These are wells without water, clouds carried by a tempest, for whom is reserved the blackness of darkness forever.
Those who do not change and do not repent of their sin will be sent to the lake of fire and the blackness of darkness forever. Revelation 21:8 says, "But the cowardly, unbelieving, abominable, murderers, sexually immoral, sorcerers, idolaters, and all liars shall have their part in the lake which burns with fire and brimstone." We can take comfort in God being a just God who will punish the wicked who do evil. We do not want anyone to go to the lake of fire, and God does not want anyone to go there either. But God must be just.