When people experience painful losses in life, they are often tempted to question God. If the questions are faith based, they often lead to greater awe regarding the character of God. He is viewed as being beyond our mental grasp.
God’s speech to Job at the end of the book of Job puts the situation as it should be. God reminds Job which one of them is God. The reader of the book is left realizing that we may not understand all of the ramifications of our suffering, but we have a God who is fully in control.
When people do not come to that conclusion, inevitably they are questioning one of the omni attributes of God. Those attributes are omniscience (all-knowing), omnipotence (all-powerful) and omnipresence (all-presence).
In their mind they conclude that one of these cannot be true. They will usually allow for the others, but one of them must be defective for God to allow suffering. The result will be either denial of God or anger towards God.
Here is how it plays out. Either God knows about our suffering and is powerless to stop it. Or he has the power to stop it but was taken by surprise when we suffer. In the first case, they cling to his omniscience but doubt his omnipotence. In the latter case, they cling to his omnipotence but question his omniscience. Either option could also exist while questioning his omnipresence, but that seems to happen less often.
The response of faith is one that rests in God being fully powerful, knowing and present. We may face seasons of doubt. During those seasons our prayer should be I believe, help my unbelief.