In chapter 5 of Job we do see the contempt for praying to the saints being stated by Eliphas. Eliphaz, Baldad and Sophar are three friends of Job. Eliphaz was a sage, Baidad and Sophar were well regarded Arabian leaders. But, Eliphas is mocking Job (maybe goading is a better word), in an attempt to get Job to confess his sins. It’s obvious from the narrative that Job’s neighbors are worried that the curse placed on Job will also visit them. But, Job is patient in his suffering – which is the moral of the story. Also see
CATHOLIC ENCYCLOPEDIA: Job
Chapter 1. Job's virtue and riches. Satan by permission from God strippeth him of all his substance. His patience.
Chapter 2. Satan, by God's permission, striketh Job with ulcers from head to foot: his patience is still invincible.
Chapter 3. Job expresseth his sense of the miseries of man's life, by cursing the day of his birth.
Chapter 4. Eliphas charges Job with impatience, and pretends that God never afflicts the innocent.
Chapter 5. Eliphaz proceeds in his charge, and exhorts Job to acknowledge his sins.
Chapter 6. Job maintains his innocence, and complains of his friends.
Chapter 7. Job declares the miseries of man's life: and addresses himself to God.
Chapter 8. Baldad, under pretence of defending the justice of God, accuses Job, and exhorts him to return to God.
Chapter 9. Job acknowledges God's justice: although he often afflicts the innocent.
Chapter 10. Job laments his afflictions and begs to be delivered.
Chapter 11. Sophar reproves Job, for justifying himself, and invites him to repentance.
And finally,
Chapter 42. Job submits himself. God pronounces in his favour. Job offers sacrifice for his friends. He is blessed with riches and children, and dies happily,
Source:
NEW ADVENT BIBLE: Job
If verses 2, 3 and 4 in chapter 5 of Job are meant to show the folly of praying to an intercessor then there is a conflict with the entire book of Job; God appears to be schizophrenic. This is apparent when God dresses down Eliphaz for his foolish advice to Job. God tells Eliphaz to go to Job and have intercede on his behalf.
…he [the Lord] said to Eliphaz the Themanite: My wrath is kindled against thee, and against thy two friends, because you have not spoken the thing that is right before me, as my servant Job hath. Take unto you therefore seven oxen and seven rams, and
go to my servant Job, and offer for yourselves a holocaust, and my servant Job shall pray for you: his face I will accept, that folly be not imputed to you: for you have not spoken right things before me, as my servant Job hath. (Job 42:7-8)
JoeT