They hid him like a piece of merchandise – Allah was well aware of what they did (12:19)
Allah had complete knowledge both of what Yusuf’s brothers had done and now what these travellers were doing with Yusuf. He was doing all this in order to raise the rank of His servant in this life and the next. Do not think for a moment that anything happens outside the knowledge of Allah.
He says to His Beloved Muhammad ﷺ : Do not be distressed at what they say: We know what they conceal and what they reveal (36:76).
This is a source of comfort for believers. One of the pious said: “All my anxieties are removed by: ‘that which Allah wills comes to pass and that which He does not will does not come to pass’”. In other words, I am certain that nothing will happen except by the will of my compassionate Lord, the One who arranges His servant’s affairs in ways that the servant does not perceive.
The believer must surrender his affairs to the All-Knowing. He must be content with Allah’s knowledge and not seek other than Him. He must trust in what He says and attempt to follow His teachings. But God Himself bears witness to what He has sent down to you– He sent it down with His full knowledge (4:166). The believer must be certain that nothing escapes Allah and things could not have been arranged any better than they are: in order that you come to know that Allah has power over all things and that Allah encompasses all things in His knowledge (65:12).
When Sayyiduna Ibrahim was thrown into the fire, he refused the help of Sayyiduna Jibril and did not even ask Allah for assistance, saying instead:
علمه بحالي يغني عن سؤالي
“His knowledge of my state means I have no need to ask Him”.
Imam al-Haddad says in the well-known poem:
قَد كَفاني عِلمُ رَبّي
مِن سُؤالي وَاِختِياري
شاهِدٌ لي بِاِفتِقاري
فَلِهَذا السِرُّ أَدعو
في يَساري وَعِساري
My Lord’s knowledge of me suffices me
No need have I then to ask him and exercise my free will.
But rather my supplications and entreaties
bear witness to my utter dependence.
This is the secret behind my prayers
In both hardship and ease.
In other words, my supplication is not to inform Him of anything (since His knowledge encompasses everything) but to express my brokenness and to receive a greater portion of His mercy.
Learning from Surah Yusuf with Habib Umar bin Hafiz (may Allah protect him and benefit us by him)