Out of His endless mercy and sheer kindness upon His helpless slaves, Allah (swt) creates for us, in the arduous journey of life, pillars of support all around us, people from within our family, from our relatives, our friends, and sometimes, people whom we never knew.
Allah brings these people into our lives to make our perilous journey a bit easier. These are the ones who are forever at our side, in grief and sorrow, as well as in happiness, always there to offer us their support and encouragement, give us that push that we always need to be able to achieve our best, to give us the will to keep moving forward even when we don't want to, to light up our horizon with beams of hope even when utter hoplessness engulfs us from every direction.
However, there is a point in life, when Allah, in His eternal wisdom, suddenly takes away these pillars of support. A person feels alone, scared, depressed, confused, not knowing what to do. He feels like he was walking in the night on a path which was illuminated by bright lamps on either side, and suddenly they are extinguished, and he is left stranded in the pitch darkness, unable to even take a step forward.
Allah does this for a reason. He wants us to realize that our only real support in this life is Him and no one else. Our only source of hope and help, strength and endurance, is only Allah. So long as we have those pillars of support around us, we will keep forgetting this reality. When Allah takes away these pillars, even temporarily, we are forced to turn to Him, to fall into sajdah and shed those tears that are so precious in the sight of Allah. This becomes a means of strengthening our connection with Him, and the fearful person in the darkness will only understand why the lamps were snuffed out, when the sun of Allah's support and help, millions of times brighter than the lamps, rises and generates an everlasting illumination. Thus, a seemingly big setback turns into an even greater bounty.
This is the wisdom of Allah which very few comprehend.