Disasters and calamities have been created for a reason, which none can fully comprehend but Allah. Some of the things that Allah has shown to us indicate this.
Disasters and calamities are a test of the believer’s patience. Allah says (interpretation of the meaning):
“Or think you that you will enter Paradise without such (trials) as came to those who passed away before you? They were afflicted with severe poverty and ailments and were so shaken that even the Messenger and those who believed along with him said, ‘When (will come) the Help of Allah?’ Yes! Certainly, the Help of Allah is near!”
This is a sign of man’s weakness and his need for his Lord, and shows that he cannot succeed unless he realizes his need for his Lord and starts beseeching Him.
Calamities are a means of expiation of sin and raising one’s status. The Prophet (peace and blessings of Allah be upon him) said: “There is nothing that befalls a believer, not even a thorn that pricks him, but Allah will record one good deed for him and will remove one bad deed from him.”
Narrated by Muslim.
It was narrated that Abu Hurayrah (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings of Allah be upon him) said: “Trials will continue to befall the believing man and woman, with regard to themselves, their children and their wealth, until they meet Allah with no sin on them.” Narrated by al-Tirmidhi, 2399; classed as saheeh (authentic) by al-Albani in al-Silsilah al-Saheehah, 2280.
And it was narrated that Jabir (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings of Allah be upon him) said: “On the Day of Resurrection, when people who had suffered affliction are given their reward, those who were healthy will wish their skins had been cut to pieces with scissors when they were in the world.” Narrated by al-Tirmidhi, 2402. See al-Silsilah al-Saheehah, no. 2206.