Allah Ta'ala says,
وَمَا نُرْسِلُ بِالْآيَاتِ إِلَّا تَخْوِيفًا.
"And We did not send signs of Our power except to frighten them (so they repent)." (QS. Al-Isra: 59)
✍🏻 Imam Qotadah Rahimahullah said,
إن الله خوف الناس بما يشاء من آياته لعلهم يعتبرون ويذكرون ويرجعون، ذكر لنا أن الكوفة رجفت على عهد ابن مسعود فقال: يا أيها الناس إن ربكم يستعتبكم فأعتبوه.
"Indeed, Allah frightens mankind with whatever He wants from the signs of His power. So that they take a lesson, realize, and then return to repent to Him.
We have been told that there was an earthquake in Kufah during the time of Abdullah bin Mas'ud's companion. He also said, 'O people, in fact your Lord is expecting you to take lessons from His rebuke, so take lessons from it (by returning to repentance to Him)'."