This discussion ofcourse is completely speculative and philosophical.
So I will try to present a philosophical hypothesis that might be able to address this question.
So.....
Perhaps there is relative Justice, and relative Evil.
I guess this is similar to when is "killing" actually allowed by our (human) standards. Are soldiers really "heroes" or "murderers"?
Were Americans who fought the revolutionary war, Patriots or terrorists?
Just trying to say that "evil" and "justice" is relative, and it depends upon the perspective.
Now let us extend this to the "world".
Lets assume that we occupy a "physical world", but God occupies everything there is! Supposing there is metaphysical world and also possibly a world without time (as some religions believe).
So God occupies a world (which includes ours) much bigger than what we occupy. Evil or Justice is simply a action/response to an event relative to our perception. But generally speaking it is simply the "change" in this world which then we translate to "evil" or "just" (or neutral) relatively.
Now if God encompasses everything there is no relativeness and actually there is no change either (since God encompasses EVERYTHING!) because what are you relating something to when that something actually encompasses everything? So God can neither be Just nor Evil.....
So there is no "relativity" when you talk about God's world. But in "our" world, Humans do have relativity and thus perceive "justice" and "evil". As the only thing we encompass is actually ourselves- what we believe "evil" and "justice" is in relation to others who encompass the rest of the world.
Now the question becomes if God can neither be Just or Evil why do religions claim God is "Just". One explanation could be that God has "chosen" to make his own justice in which he is absolutely Just as there is no "relativity" in his world so there is no "other justice" except His. You should just be happy that He chose to be "just" in some aspects as you expect. So God is Just for US but in his own world he is neither Just or Evil although he has created in own Justice in which he is Absolutely Just.
Then the question is why God tells us to do "good" and stop doing "evil" when he Himself is not Just or Evil. He has chosen a standard that you should apply to. In other words he is telling you what is good and bad in "your world", which doesn't have to apply to Himself because he encompasses everything in the first place. You would have to assume that the standard that God has chosen for Humans to live by is the best because he has the added quality (by most religions) as being the All-Knowing, in other words since he has all the knowledge he can best devise a standard for you (even better than you, yourself). Now the fact that he is Absolutely Just (in his own justice) then you have to assume that the standard he creates for you are also Just (again his Justice doesn't have to be the same as yours). So this way not only is he Just, his standards are the best for humans (even if one thinks otherwise).
Anyways I just thought up of this while writing this so there are probably some inconsistencies in this hypothesis. Anyways its not like I'm going to answer the question to which really there is no answer
Good luck to the rest of you who try
Peace be unto you