First, we must remember that our hope is not in this life:
". . . And if our hope in Christ is only for this life, we are more to be pitied than anyone in the world. But in fact, Christ has been raised from the dead. . . . For Christ must reign until he humbles all his enemies beneath his feet. And the last enemy to be destroyed is death (1 Cor. 15:19-20, 25-26)." Life will never seem "fair" until death is destroyed.
God is sovereign and just. He is capable of preventing evil, and he desires to rid the universe of evil. But to prevent all evil he would have to take away our ability to make our own choices, whether it be for good or evil. Would you want to have a child who loves you because of the relationship you have, or because it was impossible to not love you? God gave us choices, and those choices affect not only us but those around us. Evil choices lead to oppression and suffering.
The greatest thing to remember, however, is one of God’s most amazing promises we see many places in the Bible, beginning in Genesis 50:20. Joseph forgave his brothers for the awful things they had done to him – sold him into slavery, which led to years in prison after he had been falsely accused of a terrible crime. He told his brothers that what they had meant for evil God had meant for good. We find this promise again in Romans 8:28 – that God works all things together for good to those who are His. In Romans 5:3-4 He even walks us through the steps of how He makes this happen:
Suffering produces endurance in us – just like physical training brings pain, but in the end the pain has given us the ability to complete a race or win a competition.
Endurance produces good character – our changed habits in training have given us a purpose for our life which we’ve not had before.
Good character produces hope – in our physical training, our change of character has opened opportunities for us we never had before.
The illustrations here for physical training for a sports competition also apply to our spiritual life, but the rewards are eternal rather than the temporary success of winning a game or a competition. We are in training for our eternal Home in Heaven. Jesus has told us this world is just a temporary place while we prepare for that permanent life. It is why we can rejoice in all our suffering as we also read in Romans 5:3.