That is his will, his play. In his Maya (illusion) there exists knowledgeable and idiotic mind both the tendency people. Darkness is needed too. It reveals all the more the glory of light. There is no doubt that anger, lust and greed are evils. Why then has God created them?
In order to create saints. A man became a saint by conquering the senses. Is there anything impossible for a man who has subdued his passions? He can even realize God, through his grace. Again, see how his whole play of creation is perpetuated through lust. Wicked people are needed too.