All perfect praise be to Allah, the Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad, sallallahu ʻalayhi wa sallam, is His slave and Messenger.
Allah, the Exalted, says (what means): {And man supplicates for evil as he supplicates for good, and man is ever hasty.} [Quran 17:11]
Ibn Jareer commented on the verse saying:
“Allah, the Exalted, reminds His slaves of His blessings bestowed upon them. Sometimes, a person may supplicate against himself, his wealth, or his child, saying, ‘O Allah destroy or curse him/it’ at times of anger and frustration, just as he asks Allah to bless him with wellbeing and the preservation of his life, wealth, and child. Had Allah answered his supplications against himself, his child, and wealth as He has answered his supplications for wellbeing and safety, he would have been destroyed. However, Allah does not answer the supplications for evil by His grace and mercy.”
The verse has nothing to do with supplicating Allah to grant him what he believes to be good while it is actually bad for him.
As for the supplication “O Allah, save me from the evil of afflictions (Soo’ Al-Balaa’),” it is one of the collective and all-inclusive supplications that yield nothing but good. How could it be possible that supplicating Allah for protection from the evil of afflictions would be a reason for non-protection from the evil of afflictions? This understanding is quite strange!
However, there is no doubt that the human being is ungrateful and unjust; he might supplicate Allah for a specific thing that he perceives as good, such as marrying a specific woman or living in a specific place, while such a thing is actually bad for him. Therefore, the person should always ask Allah, the Exalted, to give him what He chooses for him.
Ibn Taymiyyah said:
“A supplication that is not considered a form of transgression will be answered, and the supplicant will either get what he asked for or something similar. This is the ultimate answer to his supplication, as perhaps the specific thing he asked for is impossible or bad for him or for others. While he is unaware of that and of the harm it would incur upon him, the Lord is Near and He answers all supplications mercifully; He is more merciful to His creation than a mother to her child. If the All-Generous, All-Merciful Lord is asked for a specific thing and He knows that it is not good for the supplicant, He replaces it with something else that is good for him, just like a parent does with his child if he asks his parent for something that is not his; the parent gives his child something similar from his own wealth instead. Indeed, for Allah, the Exalted, is the highest and loftiest example.”
Ibn Al-Qayyim said:
“Beware of asking Allah for a specific thing while you do not know what its consequences will be for you. If you have to do so, then make it conditional upon His Knowledge that it is good for you. And before you ask Him for something, perform Istikhaarah (guidance-seeking prayer), not just with the tongue; rather, it should be performed with the heart, with true belief that you do not know what is good for you, you have no ability to attain what is good for you or to be guided to it, and you are incapable of bringing benefit or repelling harm from yourself; rather, if a person is entrusted with managing his own affairs, he would bring about his own destruction and his affairs would be in total disarray.
If He bestows His blessings upon you without you asking for them, you should ask Him to help you use those blessings in obeying Him and attaining His pleasure, and not to render such blessings a means to distract you from Him or to move you away from His pleasure. You should not assume that all His blessings conferred upon His slaves are due to their honorable status with Him or that denying them His blessings is because they do not have such a status with Him.”
Allah knows best.