Hakeemul Ummat Hazrat Moulana Shah Ashraf Ali Thanvi ra said:
A misfortune or difficulty resulting in increasing distress and anxiety is a consequence of sins.
Whereas, one which causes an increase in one’s relationship to Allah SWT and a enhancement in one’s submission and acceptance (of the Divine will) is not a trial or tribulation in reality.
Though, it may seem to look like it.
These seemingly trials & misfortunes are sometimes for elevating one’s status (in afterlife) and for testing one’s love.
Maasir e Hakeemul Ummat 390