Creation of evil allows G-d to have pleasure of good:
A constant pleasure is not a pleasure. For this reason, Hashem created evil, as it gives a constant battle between good and bad, and when someone does good it is a novelty and victory which gives Hashem pleasure/Shashuim. If only good existed and one were to only do good, it would give no pleasure, as a constant pleasure loses excitement. It is for this reason that Hashem made Yitzchak have both Esav and Yaakov, as this gives Him Shashuim.
 Or Torah Maggid Vaeira 74