The purpose of this great calamity is to bring about repentance. The purposes of God, even in punishment, are to elevate and save others.
Notice the devil's tool that will be used in opposition to repentance: they will "be stirred up to anger, and perish." That is, to harden hearts and to blind eyes, anger will be the most effective tool. Rather than being humbled by the fall of the great whore, those who will continue to resist repentance will be angry for the losses. They will lament the loss of what they held so dearly.
This is the great watershed test. If your set backs in life humble you, then your heart is soft and you are a candidate for repentance. If you become angry, accuse God of causing evil, and refuse to be comforted, you are not a candidate for repentance. Your anger is a tool used to blind you. The one employing the tool is the enemy to your soul.