כָּל כִּתְבֵי הַקֹּדֶשׁ מְטַמְּאִין אֶת הַיָּדַיִם. שִׁיר הַשִּׁירִים וְקֹהֶלֶת מְטַמְּאִין אֶת הַיָּדַיִם. רַבִּי יְהוּדָה אוֹמֵר, שִׁיר הַשִּׁירִים מְטַמֵּא אֶת הַיָּדַיִם, וְקֹהֶלֶת מַחֲלֹקֶת. רַבִּי יוֹסֵי אוֹמֵר, קֹהֶלֶת אֵינוֹ מְטַמֵּא אֶת הַיָּדַיִם וְשִׁיר הַשִּׁירִים מַחֲלֹקֶת. רַבִּי שִׁמְעוֹן אוֹמֵר, קֹהֶלֶת מִקֻּלֵּי בֵית שַׁמַּאי וּמֵחֻמְרֵי בֵית הִלֵּל. אָמַר רַבִּי שִׁמְעוֹן בֶּן עַזַּאי, מְקֻבָּל אֲנִי מִפִּי שִׁבְעִים וּשְׁנַיִם זָקֵן, בַּיּוֹם שֶׁהוֹשִׁיבוּ אֶת רַבִּי אֶלְעָזָר בֶּן עֲזַרְיָה בַּיְשִׁיבָה, שֶׁשִּׁיר הַשִּׁירִים וְקֹהֶלֶת מְטַמְּאִים אֶת הַיָּדַיִם. אָמַר רַבִּי עֲקִיבָא, חַס וְשָׁלוֹם, לֹא נֶחֱלַק אָדָם מִיִּשְׂרָאֵל עַל שִׁיר הַשִּׁירִים שֶׁלֹּא תְטַמֵּא אֶת הַיָּדַיִם, שֶׁאֵין כָּל הָעוֹלָם כֻּלּוֹ כְדַאי כַּיּוֹם שֶׁנִּתַּן בּוֹ שִׁיר הַשִּׁירִים לְיִשְׂרָאֵל, שֶׁכָּל הַכְּתוּבִים קֹדֶשׁ, וְשִׁיר הַשִּׁירִים קֹדֶשׁ קָדָשִׁים. וְאִם נֶחְלְקוּ, לֹא נֶחְלְקוּ אֶלָּא עַל קֹהֶלֶת. אָמַר רַבִּי יוֹחָנָן בֶּן יְהוֹשֻׁעַ בֶּן חָמִיו שֶׁל רַבִּי עֲקִיבָא, כְּדִבְרֵי בֶן עַזַּאי, כָּךְ נֶחְלְקוּ וְכָךְ גָּמְרוּ:
All the Holy Scriptures defile the hands. The Song of Songs and Kohelet (Ecclesiastes) defile the hands. Rabbi Judah says: the Song of Songs defiles the hands, but there is a dispute about Kohelet. Rabbi Yose says: Kohelet does not defile the hands, but there is a dispute about the Song of Songs. Rabbi Shimon says: [the ruling about] Kohelet is one of the leniencies of Bet Shammai and one of the stringencies of Bet Hillel. Rabbi Shimon ben Azzai said: I have received a tradition from the seventy-two elders on the day when they appointed Rabbi Elazar ben Azariah head of the academy that the Song of Songs and Kohelet defile the hands. Rabbi Akiba said: Far be it! No man in Israel disputed that the Song of Songs [saying] that it does not defile the hands. For the whole world is not as worthy as the day on which the Song of Songs was given to Israel; for all the writings are holy but the Song of Songs is the holy of holies. If they had a dispute, they had a dispute only about Kohelet. Rabbi Yohanan ben Joshua the son of the father-in-law of Rabbi Akiva said in accordance with the words of Ben Azzai: so they disputed and so they reached a decision.
What was so controversial about Kohelet?
(1) The words of Kohelet, son of David, king in Jerusalem. (2) Merest breath!—said Kohelet— merest breath! All is mere breath!
(3) What real value is there for a man In all the gains he makes beneath the sun? (4) One generation goes, another comes, But the earth remains the same forever.
(א) פִּתְגָמֵי נְבוּאָה דְאִתְנַבָּא קֹהֶלֶת הוּא שְׁלֹמֹה בַּר דָּוִד מַלְכָּא דַּהֲוָה בִּירוּשְׁלֵם: (ב) כַּד חֲזָא שְׁלֹמֹה מַלְכָּא דְּיִשְׂרָאֵל בְּרוּחַ נְבוּאָה יָת מַלְכוּת רְחַבְעָם בְּרֵיהּ דְעָתִיד לְאִתְפַּלְגָא עִם יָרָבְעָם בַּר נְבָט וְיָת יְרוּשְׁלֵם וּבֵית מוּקְדְשָׁא דְאִינוּן עֲתִידִין לְמֶחֱרַב וְיָת בְנֵי עַמָּא בֵּית יִשְׂרָאֵל דִי אִינוּן עֲתִידִין לְמִגְלֵי אָמַר בְּמֵימְרֵיהּ הֲבֵל הֲבָלַיָא עַלְמָא הָדֵין הֲבֵל הֲבָלַיָא כָּל מַה דִּטְרָחִית אֲנָא וְדָוִד אַבָּא כּוּלֵיה הֲבַלוּ:
(1) The words of prophecy which Coheleth, that is, the son of David the King, who was in Jerusalem, prophesied. (2) When Solomon the King of Israel foresaw, by the spirit of prophecy, the kingdom of Rehoboam his son, which will be divided with Jeroboam the son of Nebat, and that Jerusalem and the holy temple will be destroyed, and that the people of Israel will be led into captivity, he said by the divine word, Vanity of vanities is this world! Vanity of vanities is all which I and my father David have laboured for, all of it is vanity!
(א) מַה יִּתְרוֹן לָאָדָם, אָמַר רַבִּי בִּנְיָמִין בִּקְשׁוּ חֲכָמִים לִגְנֹז סֵפֶר קֹהֶלֶת מִפְּנֵי שֶׁמָּצְאוּ בוֹ דְּבָרִים מָטִין לְצַד מִינוּת, אָמְרוּ הֲרֵי כָּל חָכְמָתוֹ שֶׁל שְׁלֹמֹה שֶׁבָּא לוֹמַר מַה יִּתְרוֹן לָאָדָם בְּכָל עֲמָלוֹ, יָכוֹל אַף בַּעֲמָלָהּ שֶׁל תּוֹרָה, חָזְרוּ וְאָמְרוּ לֹא אָמַר בְּכָל עָמָל, אֶלָּא בַּעֲמָלוֹ, בַּעֲמָלוֹ אֵינוֹ עָמֵל אֲבָל עָמֵל הוּא בַּעֲמָלָהּ שֶׁל תּוֹרָה.
(1) “What profit is there for man in all his toil that he toils under the sun?” (Ecclesiastes 1:3).
“What profit is there for man?” Rabbi Binyamin said: The Sages sought to suppress the book of Kohelet because they found in it matters that tend toward heresy. They said: All of Solomon’s wisdom that he seeks to impart is: “What profit is there for man in all his toil,” but one might [think that he meant] even in the toil of Torah. They then said: He did not say “in all toil,” but rather in his toil; in his toil he does not [profit from his] toil, but he does [profit from his] toil in the toil of Torah.
אָמַר רַבִּי שְׁמוּאֵל בְּרַבִּי יִצְחָק בִּקְשׁוּ חֲכָמִים לִגְנֹז סֵפֶר קֹהֶלֶת עַל יְדֵי שֶׁמָּצְאוּ בוֹ דְּבָרִים שֶׁמָּטִין לְצַד מִינוּת, אָמְרוּ כָּל חָכְמָתוֹ שֶׁל שְׁלֹמֹה כָּךְ שֶׁאָמַר (קהלת יא, ט): שְׂמַח בָּחוּר בְּיַלְדוּתֶךָ וִיטִיבְךָ לִבְּךָ בִּימֵי בְחוּרוֹתֶיךָ וְהַלֵּךְ בְּדַרְכֵי לִבְּךָ וּבְמַרְאֵה עֵינֶיךָ, וּמשֶׁה אָמַר (במדבר טו, לט): וְלֹא תָתוּרוּ אַחֲרֵי לְבַבְכֶם וְאַחֲרֵי עֵינֵיכֶם, וּשְׁלֹמֹה אָמַר: וְהַלֵּךְ בְּדַרְכֵי לִבְּךָ וּבְמַרְאֵה עֵינֶיךָ, הֻתְּרָה הָרְצוּעָה, לֵית דִּין וְלֵית דַּיָּן, כֵּיוָן שֶׁאָמַר: וְדָע כִּי עַל כָּל אֵלֶּה יְבִיאֲךָ הָאֱלֹהִים בַּמִּשְׁפָּט, אָמְרוּ יָפֶה אָמַר שְׁלֹמֹה.
Rabbi Shmuel ben Rabbi Yitzḥak said: The Sages sought to suppress the book of Kohelet because they found in it matters that tend toward heresy. They said: All of Solomon’s wisdom is this statement: “Rejoice, young man, in your youth; and let your heart cheer you in the days of your youth, and walk in the ways of your heart, and in the sight of your eyes” (Ecclesiastes 11:9). Moses said: “Do not stray after your heart and after your eyes” (Numbers 15:39), and Solomon said: “And walk in the ways of your heart, and in the sight of your eyes.” Restraint has been abolished; there is no [divine] justice and no [Divine] Judge. When he said: “But know that for all these, God will bring you to judgment” (Ecclesiastes 11:9), they said: Solomon spoke well.
(1) For on all this I set my heart to sort out all this - that the actions of even the righteous and the wise are in God's hand. Even love! Even hate! Man knows none of these in advance— (2) none! For the same fate is in store for all: for the righteous, and for the wicked; for the good and pure (i.e., those who observe the laws of ritual purity) and for the impure; for him who sacrifices, and for him who does not; for him who is pleasing [to God] and for him who is displeasing; and for him who swears, and for him who shuns oaths. (3) That is the sad thing about all that goes on under the sun: that the same fate is in store for all. (Not only that, but men’s hearts are full of sadness, and their minds of madness, while they live; and then—to the dead!) (4) For he who is joined to the living has something to look forward to—even a live dog is better than a dead lion— (5) since the living know they will die. But the dead know nothing; they have no more recompense, for the memory of them has been forgotten.
Qohelet, "Introduction"
Robert Alter, The Writings, p.678
How did such a book come to be included in the canon? The process of inclusion, it should be said, was not long in coming, for fragments of Qohelet found at Qumran indicate that it was already part of the library of Scripture there only a century or two after its composition. Some interpreters attribute its embrace by the shapers of the canon to the pious tilt it is given in the epilogue (12:9-14)....[But] it is surely attributing far too much naivete to the ancient readers to imagine that a few dozen words of piety at the end would deflect them from seeing the subversive skepticism emphatically reiterated throughout the text. We are unlikely to ever have a confident explanation of why Qohelet - or, for that matter, Job or Esther or the Song of Songs - entered the canon, but its inclusion suggests that the canon may not have been determined solely on the grounds of ideological and theological conformity...There must have been many Hebrew readers in the last two and a half centuries before the Common Era and on into the Common Era who were not willing to let go of Qohelet, who felt that it somehow belonged in the anthology of texts - not quite yet a canon - that constituted the literary legacy of the nation...What continues to engage the moral and philosophic imagination, as it surely must have done in Late Antiquity, is the riter who unblikingly saw all human enterprise as herding the wind, who envisaged the same grim fate for rich and poor, for the righteous and the wicked, and who was led to question whether wisdom itself in the end had any advantage over foolishness.