Assalaam'

Ayat 216 of Surat Baqra of the Holy Qur'an (2:216) reads:--

"BUT IT MAY HAPPEN THAT YOU HATE A THING THAT IS GOOD FOR YOU, AND IT MAY HAPPEN THAT
YOU LOVE A THING WHICH IS BAD FOR YOU. ALLAH KNOWS, AND YOU KNOW NOT."

According to Sayyadi Abdul-Qadir al-Jilani, may Allah be pleased with him, "that is to say, [He knows, and you do not know] what is in the best interest of your religion.... and your worldly life, for Allah (Almighty and Glorious is He) has kept concealed from His creatures the things that are to their advantage. He has charged them with servitude [Ubudiyya] to Him, by requiring fulfillment of the commandments and observance of the prohibitions [of the sacred Law], submissive resignation to that which is foreordained [maqdur], and contentment with the Divine Decree in every respect, whether it be in their favor or to their disadvantage.

He has appropriated the consequences and the benefits unto Himself exclusively, Tabaraka Wa Ta'ala,. It is,therefore, necessary for the servant to be constantly engaged in worshipful obedience to his Master, to be content with whatever Allah has allotted to him, and to harbor no doubts about Him."

For more on this, see Sidi's
"AL-GHUNYA LI TALIBI TARIQAL-HAQQ" (Sufficient Provision for Seekers of Path of Truth)