I always defer to Stephen Fry's answer[0], when approached on the aspect of the existence of a god.
The standard answer is that God may have other values than what we think of as Good. For example everything was 'good' then perhaps there wouldn't be a need for forgiveness, generosity or free will
More info: https://en.wikipedia.org/wiki/Best_of_all_possible_worlds