A muslim always tries to prevent any disaster. But if it happens, the nomenclature changes. It becomes a test of faith or a blessing in disguise.
If you pass through trials and tribulations with faith and patience, you become stronger and wiser. You become a teacher and a source of inspiration.
My dear, that trial is not a punishment. That trial is a switch button; switching on the light to lead you into greatness.
“And We will surely test you with something of fear and hunger and a loss of wealth and lives and fruits, but give good tidings to the patient: Those who, when disaster strikes them, say, “Indeed we belong to Allah, and indeed to Him we will return.” Those are the ones upon whom are blessings from their Lord and mercy. And it is those who are the [rightly] guided.” (Quran chapter 2 verses 155-157)