Answered by Sayyidi Habib Umar bin Hafiz (may Allah protect him and benefit us by him)
There are many wisdoms in this. One of the greatest of these is that it makes us conscious of Allah’s grace: had He wished, He could have made the same thing happen to us when we were children. It also allows us to come to know the greatness of Allah’s lordship in that He does whatever He wishes with His creation. We also need to realise that beyond this there are elements of divine mercy which our intellects cannot comprehend and we must recognise that we only partially perceive what is taking place in existence. They also make us realise that this world is a place of calamities so we become more detached from it and prepare for the everlasting abode of the next life.