Ecclesiastes 2:18–26 (NKJV)
18 Then I hated all my labor in which I had toiled under the sun, because I must leave it to the man who will come after me. 19 And who knows whether he will be wise or a fool? Yet he will rule over all my labor in which I toiled and in which I have shown myself wise under the sun. This also is vanity. 20 Therefore I turned my heart and despaired of all the labor in which I had toiled under the sun. 21 For there is a man whose labor is with wisdom, knowledge, and skill; yet he must leave his heritage to a man who has not labored for it. This also is vanity and a great evil. 22 For what has man for all his labor, and for the striving of his heart with which he has toiled under the sun? 23 For all his days are sorrowful, and his work burdensome; even in the night his heart takes no rest. This also is vanity.
24 Nothing is better for a man than that he should eat and drink, and that his soul should enjoy good in his labor. This also, I saw, was from the hand of God. 25 For who can eat, or who can have enjoyment, more than I? 26 For God gives wisdom and knowledge and joy to a man who is good in His sight; but to the sinner He gives the work of gathering and collecting, that he may give to him who is good before God. This also is vanity and grasping for the wind.
The writer bemoans the fact in this passage that all his labor will one day be used by someone who did not work for it. His despair came in the form of a resignation that no matter how wise, diligent, or skillfully a man has worked in his trade, it will all go one day to someone who did not labor for it! This could bring some anguish to men or women who work hard and never seem to be able to enjoy the fruit of his or her labor in their own lifetime. I am sure that sometimes you feel that someone else gets the blessing from your work. The writer of the message in Ecclesiastes sees the plight of the hard worker as hard and ultimately unrewarding. Yet in the midst of this song of anguish, Solomon gives a snippet of hope and practical guidance Eat and drink and enjoy your labor. Be satisfied with what is in your hand today. God will bless those who work hard and live good lives. But the sinner will reap and gather for the good. The true vanity is in working hard all your life in hard labor, and then suffering eternal anguish because of your unforgiven sin. God wants you to enjoy the work of your hands, BUT enjoy His presence first.