If Divine Justice exists why is there so much injustice in the world?
Why so much inequality, why do some people live in security and comfort, while many others live under horrendous conditions?
Why so many people are continually grappling with human rights abuses, hunger, disease, and war?
This question strikes at the heart of the notion of good and evil. If the Divine is all good, so why is there; and has always been; so much evil in the world? This question cannot be properly answered in the usual religious or spiritual framework. Organised religions, including the church/ mosque/ synagogue/ temple /etc; as well as most New Age spirituality schools; distort the truth of the matter. They do so through the typical psychological split of good versus bad and reject that the Divine wills anything bad. Rumi aptly calls this attitude, the “headstrong nature in humanity that longs to believe such foolishness” . Organised religions tend to attribute all the bad to the devil who manipulates human beings to commit atrocities and acts of injustice. In this manner they typically leave God pure and away from any wrong or evil. They do so either intentionally for reasons of power and control, or inadvertently out of ignorance. This is why our paradoxical question arises in the first place!
Related to good and evil are the concepts of heaven and hell; again misunderstood or misrepresented by the organised Abrahamic religions. Heaven and hell are taken to be as two “places” that one shall go after death depending on whether they did evil or good during their life.
However, Rumi; and perennial wisdom in general; teach us that both good and evil are willed by the Divine, but evil is not approved of! Evil is willed for the sake of something greater. They also teach us that heaven and hell are not “places” that we go after death; no, they are here and now and represent the state of one’s soul depending on whether one identifies with one’s ego-self or works on oneself to know one’s true self. (See below and also “Dear Rumi, why am I here?“).
The sooner we wake up and see the reality for what it is, the closer we would be to the truth and therefore to God; as in true Sufism God is the Truth.
So if we understood that both good and evil are willed by God (or the Truth, the Ground of Being, the One, the Universe, or …), then our question about the apparent contradiction between Divine Justice and the unjust world would turn out to be an irrelevant one. The right question would then become; what can I learn from the injustices of the world and what is my role and duty in all this?
Let us now hear from Rumi as he eloquently demonstrates in Discourse 47 of Fihi Ma Fihi why and how both good and evil are willed by the Divine, and also what is our role and duty in all this.
Excerpts from Rumi Discourse 47 
God wills both good and evil, but only blesses the good. His Law both commands and prohibits, but commandment is only valid when it is opposed to natural desires. If someone says, “Hungry one, eat sweetness and sugar,” that is not commandment, but a benefaction. Prohibition works in the same way. No one says, “Don’t eat stones, don’t eat thorns,” because there is no need to prohibit when there is no desire.
Therefore, for commandments and prohibition against evil to do any good, people must desire evil. And to will the existence of people who desire evil, is to will evil. But God does not approve of evil, otherwise He would not have commanded the good. This is like those who like to teach—they hope their pupils are ignorant, for they cannot teach unless their pupils need to learn. To desire a thing is to desire the need for that thing. But no teacher approves of their students’ ignorance, or why would they teach?
It is the same with doctors: they want illness to exist, since they could not display their medical skill unless people were sick. But they do not approve of illness, otherwise they would never treat it. Similarly, bakers want people to be hungry so they can ply their trade and earn a living, but they do not approve of hunger, otherwise they would not sell bread.
This is why commanders and cavalry want their king to have an opponent and an enemy. How else can they show their bravery and love for the king? The king would never muster them, having no need. But they do not approve of the king’s enemy, or they would not fight. Therefore, we should respect the evil desires within our-selves, because God loves those who are grateful and obedient to His Law, and this means nothing without the existence of those desires within us. Yet, we should not approve of those evil tendencies but struggle hard to overcome their influence.
Hence, we can see that God wills evil in one respect, but does not will it in another. Our opponents say, “God does not will evil in any way whatever.” That is impossible. How could He will a thing and not will the need for that thing? Amongst the needs that God has created is this headstrong nature in humanity that longs to believe such foolishness as what our opponents say, thus leading people away from truth. The lessons needed by such people are all the evils that exist in this material world. Did God not will those evils? However, if God had approved those evils, He would not have issued commandments and prohibitions against them. This proves that evil is willed for the sake of something greater.
But they still say, “God wills only good, and amongst such good things is abstaining from evil. Therefore, God desires only the averting of evil.” But evil cannot be averted unless evil exists. Or they say, “God wills only faith,” but faith cannot exist except after disbelief, so disbelief is a pre-requisite to faith. Therefore, willing evil is only bad when it is willed for its own sake. When evil is willed for the sake of some good, then it is good.
God is All-pardoning, All-forgiving and Terrible in retribution. Does He will that all these names should be true of Him? The answer must be “yes,” because He cannot be All-pardoning and All-forgiving without the existence of sin. Thus, He commands us to be forgiving and to make peace, but this commandment has no meaning without the existence of anger and war.