Ayesha, the wife of the Prophet ﷺ, reported that she asked the Messenger of Allah ﷺ about the plague. The Prophet of Allah ﷺ told her that it had been a punishment which Allah would send upon whomever He willed, but Allah made it a mercy for the believers. There is no servant who, when the plague strikes, remains in his town patiently, knowing that nothing will befall him except what Allah has decreed for him, except that he will receive a reward equal to that of a martyr.
عن عائشة زوج النبي ﷺ أنها أخبرتنا أنها سألت رسول الله ﷺ عن الطاعون، فأخبرها نبي الله ﷺ: أنه كان عذابا يبعثه الله على من يشاء، فجعله الله رحمة للمؤمنين، فليس من عبد يقع الطاعون، فيمكث في بلده صابرا يعلم أنه لن يصيبه إلا ما كتب الله له إلا كان له مثل أجر الشهيد.
Bukhari narrated it in the Book of Medicine (5734) from Ishaq, who said, Habban informed us, Dawud bin Abu Furat narrated to us, Abdullah bin Burayda narrated to us, from Yahya bin Yamar, from Ayesha, and he mentioned it.A tafsir close to this came from Ayesha, which is what Ibn Abu Dunya reported in his book al-Uqubat (17), through Anas, that he entered upon Ayesha along with a man who was with him. The man said to her, "O Mother of the Believers, tell us about earthquakes." She said,"When they deem fornication permissible, drink wine, and play musical instruments, Allah becomes jealous in His heaven and says to the earth, 'Quake because of them.' If they repent and desist, well and good, but otherwise it collapses upon them."He said, I said, "O Mother of the Believers, is that a punishment for them?" She said, "Rather it is an admonition, a mercy, and a blessing for the believers, and a rebuke, a punishment, and a wrath upon the disbelievers."Anas said, "I have never heard a hadith after the Messenger of Allah ﷺ that made me happier than this hadith."