So we see the beginning of the story: that Job is blameless and righteous in the eyes of the Lord. Job does not understand why things are so bad for him and he complains to God and asks him why. It seems that Job's friends are eagerly trying to help him and they may have the best intentions and sometimes they may even be correct in their wisdom and knowledge in the character of God, but they have completely missed the mark in Job's case. This shows me that even in our best intentions and in our knowledge and wisdom, we can still be so wrong in our actions and advice we give to others at times.
In this story and dialogue, we can learn that bad things happen to good people and it isn't always a result of sin. Job learns a lessen through this even though he doesn't actually sin and is innocent in his actions. God was testing Job.
But he knows where I am going. And when he tests me, I will come out as pure as gold. For I have stayed on God's paths; I have followed his ways and not turned aside. I have not departed from his commands, but have treasured his words more than daily food. But once he has made his decision, who can change his mind? Whatever he wants to do, he does. So he will do to me whatever he has planned. He controls my destiny.
At this point, Job still doesn't understand what is going on. He only sees a portion of the puzzle while God has the whole picture. Tomorrow we see God's response to Job and how humble Job becomes. Take away your pride in trying to understand or get the answers to "why". Look more at how we can continue to serve Christ through our trials.