It makes you examine the reality that man is a weak creation without any power or strength, except in your Lord. Thereupon arrogance, false pride and negligence will be removed and you will come to know that you are really poor and in need of your Creator, the Almighty, the Most Perfect, and so you resort to Him.
Tests unravel the reality of this life. Even with this amusement and play there is also toil and fatigue. This is the reality of this life – one day life is smiling at you, and the other day it is turning its back on you. This is the nature of life, but man forgets that. The perfect life is the one which follows, wherein there is no toil, worry, fatigue or disease. And this life of the world is only amusement and play! Verily, the home of the Hereafter – that is the life indeed (i.e. the eternal life that will never end), if they but knew. [Noble Quran 29:64]
The tests and trials remind the person of the favors bestowed upon him by Allah. We are reminded to avoid being in a state of joy such that we feel arrogance and likewise to avoid a state of sadness and grief such that one feels despair. No calamity befalls on the earth or in yourselves but it is inscribed in the Book of Decrees (Al-Lauh Al-Mahfouz) before We bring it into existence. Verily, that is easy for Allah. In order that you may not grieve at the things over that you fail to get, nor rejoice over that which has been given to you. And Allah likes not every prideful boaster. [Noble Quran 57:22-23]
Trials and tests remind the person of his shortcomings and diseases (of the heart and actions) so that he can take preventive measures against them.And whatever of misfortune befalls you, it is because of what your hands have earned. And He pardons much. [Noble Quran 42:30]. There is a chance for repentance before the greater torment occurs. And verily, We will make them taste of the near torment (i.e. the torment in the life of this world, i.e. disasters, calamities) prior to the supreme torment (in the Hereafter), in order that they may (repent and) return (i.e. accept Islam). [Noble Quran 32:21]
Tests and trials serve as great teaching processes through which one learns patience. We cannot be firm upon truth and obedience except with patience. But none is granted it except those who are patient – and none is granted it except the owner of the great portion (of happiness in the Hereafter, i.e., Paradise, and of a high moral character) in this world. [Noble Quran 41:35]