In the bible, there was a story of a man, asking God the same question. Why does the world is so unfair.
"Whenever I complain to you, Lord, you are always fair.
But now I have questions about your justice.
Why is life easy for sinners? Why are they successful?
You plant them like trees; you let them prosper and produce fruit.
Yet even when they praise you, they don’t mean it". ( Jeremiah 12: 1-2 )
And you want to know whats God's response?
"If you get tired in a race against people,
how can you possibly run against horses?
If you fall in open fields, what will happen in the forest along the Jordan River?" (Jeremiah 12:5 )
The moment we asked God why such thing happened, He didn't give us the exact answer. He always gives us answers that make us think what does it mean. In short, God wants us to learn.
If you are in a situation where you are asking God, listen to God. Listen on what he says. Analyze what God wants you to learn. Discern what God wants you to do.