Solomon has put himself in the position of a man who does not know God in order to describe the world of the one who has no faith: this is how we are to understand these words. He does this in order to expose that world for the hopeless existence that it is.
What have human beings done to their world and to the precious gift of life when it can seem so worthless that they would happily throw it away?