If you remember, the story of Job begins in Heaven. God knew Job's heart and realized that Job would be faithful even if he lost all his material riches, his family and his health. Satan felt Job, and humanity in general, were faithful to God only when they were blessed. Job's losses were devastating, he longed to die and put an end to his suffering. Yet, he never followed the advice to "curse God and die". In his humbled state God was able to teach him many great truths.
Its is hard to understand why so many people suffer, and why evil seems to prosper and thrive. Still, Job's conversations with God remind us we are not to question God and His motives, they are far greater than we can comprehend in our carnal and temporal prison.
It was strange reading this question. Just this morning I was thinking of Job. Like him, I have prayed for God to let me die. I am so tired of pain, and weakness, so tired of poverty, loneliness and just struggling to live a somewhat normal life. I can't imagine going on like this much longer. I can't question why all this has happened to me. However, it would be an act of mercy to go ahead and die and put this misery to an end. I lack the courage to kill myself, but I am also losing the courage to live. I can relate to how Job felt when he lost everything but his life.
Job is more than just a parable about the danger of riches, it goes right down to our relationship with God. Remember, Job's riches were restored after he proved faithful, and discovered that ultimately, God is in full control. That fact is hard to hang on to when our lives fall apart.