The preacher observes all of the absurdities of life; wicked receive the rewards of the righteous and the righteous are treated badly. Have you ever seen that. I have and sometimes it causes folks to wonder, "where is God in all of that." In fact, I know some folks who have walked away from the church because they cannot conceive of a good and righteous God who would allow the innocent to suffer and the evil to prosper. It is a complexity, a conundrum that we will not fully understand in this life.
The preacher observes and comments "There is something else meaningless that occurs on earth: righteous men who get what the wicked deserve, and wicked men who get what the righteous deserve. This too, I say, is meaningless. So I commend the enjoyment of life, because nothing is better for a man under the sun than to eat and drink and be glad. Then joy will accompany him in his work all the days of the life God has given him under the sun."(Ecclesiastes 8:14-15)
There are mysteries in this life. The evil one has considerable influence with the souls of many men and righteousness seems far away.....mercy and justice are difficult to find. Still we believe that promises of God, that the broken hearted will be comforted and the sick healed. The righteous shall one day reign and the beast will be cast into a lake of fire and sealed up never to afflict God's children again. In the meantime we must be content with the knowledge that God is at work and his plan cannot be derailed. There is good being accomplished according to God's plan in every situation.
If we can be content in that knowledge, then we can enjoy life because we have the full faith in the promise and the promiser. We will survive, we will recieve an eternal reward, the resurrection will be ours. We can live in that joy, we can find comfort in the sunshine and the rain, the good time and the bad, our God reigns and that is enough to give us hope and joy and strength for the living of our days.