Allah puts his servants through in this world to cleanse them before their final accounting
"When Allah wants good for his slave, He hastens his punishment in the world. And when He wants bad for His slave, He withholds his sins from him until he appears before Him on the Day of Judgement."
And with this (same) chain, (it was reported) from the Prophet ﷺ who said: "Indeed greater reward comes with greater trial. And indeed, when Allah loves a people He subjects them to trials, so whoever is content, then for him is pleasure, and whoever is discontent, then for him is wrath."
قَالَ رَسُولُ اللَّهِ ﷺ: «إِذَا أَرَادَ اللَّهُ بِعَبْدِهِ الْخَيْرَ عَجَّلَ لَهُ الْعُقُوبَةَ فِي الدُّنْيَا، وَإِذَا أَرَادَ اللَّهُ بِعَبْدِهِ الشَّرَّ أَمْسَكَ عَنْهُ بِذَنْبِهِ حَتَّى يُوَفَّى بِهِ يَوْمَ الْقِيَامَةِ۔»
وَبِهَذَا الإِسْنَادِ عَنِ النَّبِيِّ ﷺ قَالَ: «إِنَّ عِظَمَ الْجَزَاءِ مَعَ عِظَمِ الْبَلاَءِ۔ وَإِنَّ اللَّهَ إِذَا أَحَبَّ قَوْمًا ابْتَلاَهُمْ۔ فَمَنْ رَضِيَ فَلَهُ الرِّضَا، وَمَنْ سَخِطَ فَلَهُ السَّخَطُ۔»