Al-An'aam • BN-TAFSEER-IBN-E-KASEER
﴿ وَلَقَدْ أَرْسَلْنَآ إِلَىٰٓ أُمَمٍۢ مِّن قَبْلِكَ فَأَخَذْنَٰهُم بِٱلْبَأْسَآءِ وَٱلضَّرَّآءِ لَعَلَّهُمْ يَتَضَرَّعُونَ ﴾
“And, indeed, We sent Our messages unto people before thy time, [O Prophet,] and visited them with misfortune and hardship so that they might humble themselves:”
Please check ayah 6:45 for complete tafsir.