Qur'aan 7: 94-95
أَخَذۡنَآ أَهۡلَهَا بِٱلۡبَأۡسَآءِ وَٱلضَّرَّآءِ لَعَلَّهُمۡ يَضَّرَّعُونَ
We seized its people with suffering and adversity, so that they might humble themselves
We seized its people with suffering and adversity, so that they might humble themselves
This Ayah indicates that Allah sent down severe afflictions to them so that they might turn to Him, but they did not do what He ordered them. Therefore, He changed the affliction into prosperity to test them,
ثُمَّ بَدَّلۡنَا مَكَانَ ٱلسَّيِّئَةِ ٱلۡحَسَنَةَ
Then We changed the evil for the good,
Therefore, Allah changed the hardship into prosperity, disease into health, poverty into richness, so that they might be thankful to Allah for this, but they did none of that.
حَتَّىٰ عَفَواْ وَّقَالُواْ قَدۡ مَسَّ ءَابَآءَنَا ٱلضَّرَّآءُ وَٱلسَّرَّآءُ فَأَخَذۡنَـٰهُم بَغۡتَةً۬ وَهُمۡ لَا يَشۡعُرُونَ
until they increased in number and in wealth, and said: "Our fathers were touched with evil and with good.''
So We seized them all of a sudden while they were unaware.
He tested them with afflictions and ease so that they may humble themselves and repent to Him. However, they failed both tests. They said, "It is a cycle where we sometimes suffer a hardship and at other times, we enjoy a bounty.'' However, they did not comprehend Allah's wisdom, nor the fact that He is testing them in both cases. And, thus faced His punishment.
Source: www.tafsir.com