Ecclesiastes 3:18 Midrash

אָמַ֤רְתִּֽי אֲנִי֙ בְּלִבִּ֔י עַל־דִּבְרַת֙ בְּנֵ֣י הָאָדָ֔ם לְבָרָ֖ם הָאֱלֹהִ֑ים וְלִרְא֕וֹת שְׁהֶם־בְּהֵמָ֥ה הֵ֖מָּה לָהֶֽם׃

I said in my heart: ‘It is because of the sons of men, that God may sift them, and that they may see that they themselves are but as beasts.’

Read midrashic interpretation of Ecclesiastes 3:18: and classical rabbinic exegesis.