Yeah, and God also knew the outcome of Job's trials...why teach Job a lesson when he couldn't have done differently?
Despite his troubles, Job remained steadfast.
He didn't fault God.
THAT is the lesson.
I'm reading this post and I remembered reading during the Rwanda massacres about how some pre-teen girls who had had their families butchered were found fearful...yet singing childrens praise songs to God. There was no seeming reason why God allowed these girls to suffer the horrors they did in the same way that Job was innocent and in the same manner...acknowledged his God and refused to curse him. Yet Job praises God and so did these little girls!