The Lord has asked dozens of prophets to deliver the same message to different groups of people throughout history with varying results.
When Jonah finally delivered his message to the people of Ninevah they repented and were not destroyed. After giving multiples warnings to the people of Sodom and Gomorrah. Jeremiah, Lehi and others tell Jerusalem to repent or be destroyed but they don't resulting in the Babylonian captivity. I think it's interesting to note that whenever a nation reaps the consequences of their rebellion against God the Lord protects his righteous people. Sometimes he leads them away before things get bad, like with Lot and Lehi. Sometimes he consecrates the circumstances for the good of the righteous like with Daniel.
In any case, King Noah's people were warned to repent or die. Alma repents, he teaches other people and they repent. Then they all leave.
As soon as they leave the destruction comes. Once all the righteous people are gone, the Lamanites come to wage war against the Limhites.
But here is what I love about this story and what it teaches us about the Lord. King Noah, who is very wicked dies. The wicked priests are scattered. The remaining people are enslaved.
But they learn!
It's a bumpy ride. They end up being attacked by the Lamanites once, then attacking the Lamanites three times themselves all with disastrous results. But eventually they repent.
What happens when they repent?
Ammon shows up and they escape without any bloodshed to Zarahemla where they join the church of Christ.
It reminds me of this quote from President Benson: "The Lord will have a humble people. Either we can choose to be humble or we can be compelled to be humble."
The Lord is not interested in punitive destruction. He doesn't destroy the people because he's angry at them. He creates circumstances that will lead the people to him, that cause them to turn to him in prayer and rely upon him for their support. And he gives them lots and lots of chances.