Thus, everything He created was for a wise purpose. He—glorified is He—has said:
“He perfected everything He created.”
[Surah al-Sajdah: 7]
And He has said:
“Such is the handiwork of Allah, who perfected all things.”
[Surah al-Naml: 88]
Every one of His Most Beautiful Names is a name by which He is praised; that is why they are all most beautiful. The most beautiful is the opposite of the worst. Thus, all of them are beautiful, and whatever is beautiful is loved and praised.
What is intended by creation, therefore, is what He loves and is pleased with, and that is praiseworthy. There may, however, be something that He wills as a necessary concomitant of that, because it is one of the necessary concomitants of what He loves or one of the means to it. For it is impossible for that which entails something to exist without its necessary concomitant, just as knowledge and will cannot exist without life, and a child—[as one who has been born] (1)—cannot exist without birth.
The Prophet—may Allah bless him and grant him peace—said in the authentic hadith of the opening supplication:
“All good (2) is in Your hands, and evil is not attributable to You.” (3)
One interpretation is that evil is not something through which one may draw near to You, on the assumption that it refers to prohibited deeds. It has also been said: