You probably skipped the part where God gives Job a tongue-lashing.
You see, most of the book of Job is him and his three friends going back and forth, where they say God wouldn't give him so much sorrow unless he'd sinned somehow, and Job responds with confidence in his own righteousness:
Not for any injustice in mine hands: also my prayer is pure... Also now, behold, my witness is in heaven, and my record is on high. My friends scorn me: but mine eye poureth out tears unto God.
Job 16:17, 19-20
I put on righteousness, and it clothed me: my judgment was as a robe and a diadem. I was eyes to the blind, and feet was I to the lame. I was a father to the poor: and the cause which I knew not I searched out. And I brake the jaws of the wicked, and plucked the spoil out of his teeth.
Let me be weighed in an even balance, that God may know mine integrity.
Job acknowledges that if he had sinned, he would deserve a punishment, but he's very confident that he hasn't done anything wrong. After twenty-nine chapters of debate, Job's three friends gave up:
So these three men ceased to answer Job, because he was righteous in his own eyes.
Enter Elihu, the fourth friend.
Then was kindled the wrath of Elihu... against Job was his wrath kindled, because he justified himself rather than God... For Job hath said, I am righteous: and God hath taken away my judgment.
Job 32:2, 34:5
Have we ever been like that? Have you or I ever been quicker to justify ourselves in the law, instead of the God who wrote the law?
Surely it is meet to be said unto God, I have borne chastisement, I will not offend any more: That which I see not teach thou me: if I have done iniquity, I will do no more.
In his self-justification, Job was missing out on learning opportunities. Have you or I ever neglected our relationship with God because we were "already righteous enough?" Have we assumed we understood all his expectations for us already, or have we ignored possible flaws in our desire to be perfect, right now? If so, Jesus had something to say about our actions:
And one of the Pharisees desired him that he would eat with him. And he went into the Pharisee’s house, and sat down to meat. And, behold, a woman in the city, which was a sinner, when she knew that Jesus sat at meat in the Pharisee’s house, brought an alabaster box of ointment, And stood at his feet behind him weeping, and began to wash his feet with tears, and did wipe them with the hairs of her head, and kissed his feet, and anointed them with the ointment.
Now when the Pharisee which had bidden him saw it, he spake within himself, saying, This man, if he were a prophet, would have known who and what manner of woman this is that toucheth him: for she is a sinner.
And Jesus answering said unto him, Simon, I have somewhat to say unto thee.
And he saith, Master, say on.
There was a certain creditor which had two debtors: the one owed five hundred pence, and the other fifty. And when they had nothing to pay, he frankly forgave them both. Tell me therefore, which of them will love him most?
Simon answered and said, I suppose that he, to whom he forgave most.
And he said unto him, Thou hast rightly judged.
And he turned to the woman, and said unto Simon, Seest thou this woman? I entered into thine house, thou gavest me no water for my feet: but she hath washed my feet with tears, and wiped them with the hairs of her head. Thou gavest me no kiss: but this woman since the time I came in hath not ceased to kiss my feet. My head with oil thou didst not anoint: but this woman hath anointed my feet with ointment.
Wherefore I say unto thee, Her sins, which are many, are forgiven; for she loved much: but to whom little is forgiven, the same loveth little.
And he said unto her, Thy sins are forgiven... Thy faith hath saved thee; go in peace.
If that isn't enough to shake our desire to be justified now, to be perfect of ourselves, without grace, then perhaps the next section of the book of Job will give us pause. After Elihu's words, "the Lord answered Job out of the whirlwind," and spent four entire chapters telling him how stupid he was.
Who is this that darkeneth counsel by words without knowledge? Gird up now thy loins like a man; for I will demand of thee, and answer thou me.
Where wast thou when I laid the foundations of the earth? declare, if thou hast understanding. Who hath laid the measures thereof, if thou knowest? or who hath stretched the line upon it? Whereupon are the foundations thereof fastened? or who laid the corner stone thereof; When the morning stars sang together, and all the sons of God shouted for joy?
If you or I felt too confident in our own righteousness, we might ask, Have I searched the deepest recesses of my heart? Do I ever feel happy about being a good person now, being Okay already, and not feeling obligated to improve any further? Could I really say, with confidence, that I have been forgiven of all sin and would never sin again, through God's grace? Am I more interested in my own righteousness or in what I can learn from God? Do I really believe that my good works are a manifestation of God's grace, that without him I am nothing?
Job must have asked himself some of these questions, and it sounds like the answers must have been painful:
I uttered that I understood not; things too wonderful for me, which I knew not... Wherefore I abhor myself, and repent in dust and ashes.
Job 42:3, 6
It wasn't until Job repented, and became like the woman who anointed Jesus' feet instead of like Simon the Pharisee, that we get our happy ending. Job prayed for his friends and said to God,
I have heard of thee by the hearing of the ear: but now mine eye seeth thee.
And the Lord turned the captivity of Job, when he prayed for his friends: also the Lord gave Job twice as much as he had before.
Then came there unto him all his brethren, and all his sisters, and all they that had been of his acquaintance before, and did eat bread with him in his house: and they bemoaned him, and comforted him over all the evil that the Lord had brought upon him: every man also gave him a piece of money, and every one an earring of gold.
So the Lord blessed the latter end of Job more than his beginning...
And in all the land were no women found so fair as the daughters of Job: and their father gave them inheritance among their brethren.
After this lived Job an hundred and forty years, and saw his sons, and his sons’ sons, even four generations.
So Job died, being old and full of days.
Job 42:10-12, 15-17