Everything happens for a reason right?

السلام عليكم
بِسْمِ اللهِ الرَّحْمنِ الرَّحِيمِ
سُوۡرَةُ بنیٓ اسرآئیل / الإسرَاء
ٱقۡرَأۡ كِتَـٰبَكَ كَفَىٰ بِنَفۡسِكَ ٱلۡيَوۡمَ عَلَيۡكَ حَسِيبً۬ا (١٤) مَّنِ ٱهۡتَدَىٰ فَإِنَّمَا يَہۡتَدِى لِنَفۡسِهِۦ‌ۖ وَمَن ضَلَّ فَإِنَّمَا يَضِلُّ عَلَيۡہَا‌ۚ وَلَا تَزِرُ وَازِرَةٌ۬ وِزۡرَ أُخۡرَىٰ‌ۗ وَمَا كُنَّا مُعَذِّبِينَ حَتَّىٰ نَبۡعَثَ رَسُولاً۬ (١٥) وَإِذَآ أَرَدۡنَآ أَن نُّہۡلِكَ قَرۡيَةً أَمَرۡنَا مُتۡرَفِيہَا فَفَسَقُواْ فِيہَا فَحَقَّ عَلَيۡہَا ٱلۡقَوۡلُ فَدَمَّرۡنَـٰهَا تَدۡمِيرً۬ا (١٦) وَكَمۡ أَهۡلَكۡنَا مِنَ ٱلۡقُرُونِ مِنۢ بَعۡدِ نُوحٍ۬‌ۗ وَكَفَىٰ بِرَبِّكَ بِذُنُوبِ عِبَادِهِۦ خَبِيرَۢا بَصِيرً۬ا (١٧) مَّن كَانَ يُرِيدُ ٱلۡعَاجِلَةَ عَجَّلۡنَا لَهُ ۥ فِيهَا مَا نَشَآءُ لِمَن نُّرِيدُ ثُمَّ جَعَلۡنَا لَهُ ۥ جَهَنَّمَ يَصۡلَٮٰهَا مَذۡمُومً۬ا مَّدۡحُورً۬ا (١٨) وَمَنۡ أَرَادَ ٱلۡأَخِرَةَ وَسَعَىٰ لَهَا سَعۡيَهَا وَهُوَ مُؤۡمِنٌ۬ فَأُوْلَـٰٓٮِٕكَ ڪَانَ سَعۡيُهُم مَّشۡكُورً۬ا (١٩)
(It will be said to him): "Read your book. You yourself are sufficient as a reckoner against you this Day." (14) Whoever goes right, then he goes right only for the benefit of his ownself. And whoever goes astray, then he goes astray to his own loss. No one laden with burdens can bear another's burden. And We never punish until We have sent a Messenger (to give warning). (15) And when We decide to destroy a town (population), We (first) send a definite order (to obey Allâh and be righteous) to those among them [or We (first) increase in number those of its population] who lead a life of luxury. Then, they transgress therein, and thus the word (of torment) is justified against it (them). Then We destroy it with complete destruction (16) And how many generations have We destroyed after Nûh (Noah)! And Sufficient is your Lord as an All-Knower and All-Beholder of the sins of His slaves. (17) Whoever desires the quick-passing (transitory enjoyment of this world), We readily grant him what We will for whom We like. Then, afterwards, We have appointed for him Hell, he will burn therein disgraced and rejected, - (far away from Allâhs Mercy). (18) And whoever desires the Hereafter and strives for it, with the necessary effort due for it (i.e. do righteous deeds of Allâh's Obedience) while he is a believer (in the Oneness of Allâh— Islâmic Monotheism), then such are the ones whose striving shall be appreciated, (thanked and rewarded by Allâh). (19)