Job had led a wonderful life. Then everything came crashing down, which led him to question the point of his life,
“Why then have You brought me out of the womb? Oh, that I had perished and no eye had seen me! I would have been as though I had not been. I would have been carried from the womb to the grave” (Job 10:18-19).
He no longer saw any point to his life, and thus wished to die, and he even went beyond that, wishing that he had never been born, or that he had died shortly after birth so that he might have missed his suffering. Some people enter the throes of suffering, and it so agonizes them that they see no point to life.
However, Job stayed with God and by patience saw a blessed end.