Few people can say they “had it all.” The writer of Ecclesiastes could. But looking back, he gives wisdom that only someone who had it all can provide. Spoiler alert: having everything this world offers can’t fulfill you. You need something greater than that.
The height of wisdom literature, the preacher/teacher of Ecclesiastes is giving lessons learned from a long life. The first, which is really the theme of the book, is that none of the good things of life can provide the ultimate meaning we seek and need. Outside of that, it all comes to futility. It is a vain chasing after the wind.