"Why died I not in the womb? why did I not give up the ghost when I came out of the belly?" (Job 3:11)
Those were Job's questions as he felt the pain of everything suddenly taken from him. To his questions, God had answers, but Job could not see the answers. Job did not know that his life and trials would be used to encourage Christians throughout the generations to press on and trust God. God may have never disclosed to Job the reasons for his struggles, but God had amazing answers and His reasons were best.
Later, Job begged, "Oh that I might have my request; and that God would grant me the thing that I long for! Even that it would please God to destroy me; that He would let loose His hand, and cut me off!" (Job 6:8-9)
Sometimes in the heat of emotion, we desire of God that which God graciously denies. Had God destroyed Job at this point, Job would not have had the amazing blessing of talking with God while in this flesh, nor would Job have seen the way God turned around his captivity and given him more livestock and ten more children (see Job 42:10-14).
The story of Job reminds me that God knows the absolute best for me while I am caught in the fog of the present. It reminds me that though I may not be able to see how it will all work out, God will work it out for His good.
"And we know that all things work together for good to them that love God, to them who are the called according to his purpose." (Romans 8:28)