The Book of Ecclesiastes is a key to a more inward-directed Judaism, posing as it does the great question:
What is life? What is it all for?
These are the basic questions of every thinking person.
And in the course of the book, all the substantial, rational, and usual solutions to this question are demolished, again and again.
What is the purpose of life?
Certainly not any one of the possibilities that Ecclesiastes raises, telling us of his own experience and his eventual despair.
The essential conclusion of the book, in terms of an answer to the fundamental question, is:
There is no way of finding the purpose of life within the framework of physical life itself.
And if we pursue this line of thought we reach the conclusion:
If there is a purpose to life, it has to be beyond life.
–Rabbi Adin Steinsaltz
From On Being Free by Rabbi Adin Steinsaltz