We like to tell ourselves that hard work is its own reward. But that is not entirely true. Work cannot be an ends in itself. Neither can money, or things, or pleasures. All of these are just temporary moments of fulfillment at best. They all must focus us to a greater purpose.
Solomon vents his frustrations at the pursuits of wisdom, pleasure, leisure, accomplishment, and treasure. All those kinds of things would not really bring a full joy. In the end they left the big questions unanswered and the needs of his heart unmet. They all led to the same frustrating chasing of the wind that plagued Solomon's soul.
This is the way of the world. We were made for more and we know it. This knowledge is why we pursue almst anything with the rabid devotion of a starving person, hoping for those answers to settle. And it is what should lead us to pursue our pleasure in God Who is the Source of those things. We mistake the signs for the destination every time.
There is nothing to be gained under the sun if we ignore the call to live under the Son. When we begin to live with an eternal viewpoint, things change. There is still the vanity of earthly things. But there is a deeper purpose that lifts us out of the blowing, worthless wind and into the joy of our Father's love.