Why did Allaah the Almighty create evil; why not just good?
All perfect praise be to Allaah, the Lord of the worlds. I testify that there is none worthy of worship except Him, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
Dear brother, you should know that asking such questions leads to endless doubts and confusion. You should submit to the destiny decreed by Allaah The Almighty and believe in it, whether you perceive it to be good or evil, as this is one of the tenets of [our] faith.
Furthermore, you must be aware that scholars say that it is impolite to say that Allaah The Almighty has willed what is evil for His slaves, despite the fact that He is the One who created them. They cite as evidence, what Ibraaheem (Abraham) was quoted as saying, in the verse (which means): {And when I am ill, it is He who cures me} [Quran 26:80]; and, what the Jinn said (which means): {And we do not know [therefore] whether evil is intended for those on earth or whether their Lord intends for them a right course.} [Quran 72:10]
In these two verses, we notice that Ibraaheem said “If I am ill”, not “if He made me ill”. Also, in the sentence where they mention evil, the Jinn did not specify a doer, but when they spoke of good, they mentioned Allaah The Almighty. This was done out of respect for Him, as it was narrated that part of the invocation of the Prophet, sallallaahu ‘alayhi wa sallam, when praying at night was, “and evil is not from You.” [Muslim]
If anyone should say that they can see bad things all around them, in terms of diseases and sins, etc., they should be told that the doings [and creations] of Allaah The Almighty are totally good and wise. They are absolutely devoid of evil, although they might reflect harmfully on some people, as a result of their actions and choices.
Secondly, evil is only to be found in the subjects of His power and acts [as opposed to being inherent within the acts themselves)] This becomes evident, when we consider the harm from some creatures that are subject to His power, such as snakes and scorpions. We also find poverty, drought and the like, because Allaah The Almighty has created these for a certain wisdom.
You must be aware of this and know, as well, that Allaah the Almighty has guided us away from posing such questions and toward submission to Him. He Says (what means): {He is not questioned about what He does, but they will be questioned.} [Quran 21:23]
Allaah Knows best.
You can search for fatwa through many choices