Sometimes in this Dunya (world) we are given what we do not want or ask for, and sometimes that which we wish for is just not attainable. Allah `azza wa jall keeps some things away from us, things which our hearts may ardently request, and yet He at times places the world at our feet. He chooses, He commands and He runs our affairs out of wisdom which belongs only to Him. We thus remain suspended between being given of our wishes and being given other than that. The smart one therefore realizes that he or she remains suspended between patience and gratitude…
Were He to let the Dunya loose on us and give us of our every want, will and desire, then indeed we would have forgotten Him and we would have become arrogant in the land without right. So He, Subhanahu wa Ta’ala, withholds some things and gives us others in order to keep us as believers, humble ones, constantly in a state of iftiqar (dire need) to His Majesty.
وَلَوْ بَسَطَ اللَّهُ الرِّزْقَ لِعِبَادِهِ لَبَغَوْا فِي الْأَرْضِ وَلَٰكِن يُنَزِّلُ بِقَدَرٍ مَّا يَشَاءُ ۚ إِنَّهُ بِعِبَادِهِ خَبِيرٌ بَصِيرٌ
“And if Allah were to expand the provision for His slaves, they would have surely rebelled on the earth, but He sends down what He wills by a due measure. Verily! He is in respect of His slaves, the Well-Aware, the All-Seer.” [al-Shura: 27]
Rasulullah (sallallahu `alayhi wa sallam) taught us to say after each prayer the following supplication, and he himself was foremost in saying it:
اللهم لا مَانِعَ لِما أعْطَيتَ ولا مُعْطِي لِما مَنَعْتَ
‘O Allah, nothing can withhold what You have given and no-one can give what You have withheld.’
It is a true beauty, which reminds every believer and renews his/her strength, belief and reliance. It’s a powerful wall for us to lean on whenever difficulties arise and it is an ascending set of stairs for us to use when we need to walk out of each and every calamity.
Sufyan ath Thawri rahimahullah said: "Verily, when Allah withholds, He actually gives, because He did not withhold on account of miserliness or stinginess, but rather He looked at the benefit of the servant.
So the fact that He withheld is actually His choice for the servant and His excellent decision.”(Madarij as-Salikeen 2/215)
on the way to guidance.