The simple-minded or [[Triumphalism|triumphalistic]] view of some believers is that those who trust in God should be protected from all harm. Good people deserve good things; bad people deserve bad things. For such people, the experience that innocent people suffer and wicked people prosper often causes them to lose their "faith" in God. They have built their house on sand and it is no wonder that it collapses when the first storm strikes it.
The Book of Job]] was written precisely to demolish the idea that innocent suffering is inconsistent with God's goodness.
'''Theodicy''' is the branch of theology that addresses these kinds questions.