Allaah's سبحانه و تعالى creation is all good, and is of great underlying wisdom and benefit. However, the goodness and wisdom behind what appears to be evil may not be perceived by many people.
Whereas texts of the Qur'aan and Sunnah attribute good and honourable actions directly to Allaah سبحانه و تعالى, they often do not directly attribute to Him actions or things that are apparently evil. This is done out of respect and reverence for Him. The same rule applies to dreams: attributing good dreams directly to Allaah سبحانه و تعالى is a common practise in the Sunnah, whereas bad dreams are attributed to Shaytaan - though he does not create them.