I think Ecclesiastes is an apt counterpoint to Job in that both the afflicted Job and the prosperous author of Ecclesiastes conclude that the fear of God is the only satisfying pursuit of man.
Even though the author of Ecclesiastes is anonymous, many scholars believe the author to be Solomon because no other king in the line of David possessed such wisdom and possessions as described in the book of Ecclesiastes. If the author is indeed Solomon, it makes the book all the more meaningful because Solomon had every worldly possession and privilege known to man – yet he still concluded it was all “vanity” apart from God.
Wisdom, Possessions, Pleasure, even hard work – Solomon argued that they were all meaningless “under the sun.” When Solomon used the phrase, “under the sun,” he was referring to all things in this fallen world.
Without God placing eternal value on our lives, everything “under the sun” is fleeting and meaningless – leading to death.
Solomon writes about the vanity of “work”…
So I turned about and gave my heart up to despair over all the toil of my labors under the sun, because sometimes a person who has toiled with wisdom and knowledge and skill must leave everything to be enjoyed by someone who did not toil for it. This also is vanity and a great evil. (Ecclesiastes 2:20-21).
In contrast, Paul, writing to the Thessalonians, speaks about the eternal significance of his work. Paul says that coming to Thessalonica was “not in vain” (1 Thess. 2:1). And Paul also speaks of “toil” but his “toil” has purpose…
For you remember, brothers, our labor and toil: we worked night and day, that we might not be a burden to any of you, while we proclaimed to you the gospel of God (1 Thessalonians 2:9).
Paul finds value in his work because of the gospel. His work supports, enables, and is motivated by the gospel. The gospel is eternal, so Paul’s work has eternal significance. In fact, Paul even calls the church at Thessalonica his “glory and joy” (1 Thess. 2:20) because they signify his eternal work in this fallen world.
As Solomon considers the temporary nature of work in this fallen world, he turns to look at God’s eternal nature…
I perceived that whatever God does endures forever; nothing can be added to it, nor anything taken from it. God has done it, so that people fear before him (Ecclesiastes 3:13).
Without the fear of the Lord, Solomon concluded that life was vanity.
Without the fear of the Lord, Job’s suffering was hopeless.
Without the fear of the Lord, Paul’s work was purposeless.
Everything is “vanity” apart from the fear of the Lord!