“The Lord saw that the wickedness of man was great on the earth, and every inclination of the thoughts of his heart was only evil all the day” (Genesis 6:5). “The Lord saw that the wickedness of man was great” – it is written: “For there is a man whose work is with wisdom, with knowledge, and with smoothness” (Ecclesiastes 2:21).1“There is a man” actually refers to God, as the Midrash goes on to elaborate.
Rabbi Yudan said: How great is the power of prophets, in that they can liken the creation to its Creator,2This is phrased euphemistically, as they actually describe the Creator in human terms. as it is stated, [describing a vision of God]: “I heard the voice of a man by the Ulai” (Daniel 8:16). Rabbi Yehuda bar Simon said: You have another verse that is even clearer than this one, as it is stated [describing a vision of God]: “And upon the likeness of the throne was a likeness, like the appearance of a man” (Ezekiel 1:26).
“Whose work is with wisdom” – as it is stated: “The Lord founded the earth with wisdom” (Proverbs 3:19). “With knowledge” – as it is stated: “With His knowledge the depths were breached” (Proverbs 3:20). “And with smoothness” – Rabbi Berekhya in the name of Rabbi Yehuda bar Simon: Neither with toil nor with exertion did the Holy One blessed be He create His world, but rather, “With the word of the Lord the heavens were made” (Psalms 33:6) – upon [utterance of] the word of the Lord, the heavens were already made.
“But he will give it over to a man who did not toil for it to be his portion” (Ecclesiastes 2:21) – this is the generation of the Flood. “This too is futility and a great evil” (Ecclesiastes 2:21) – “the Lord saw that the wickedness of man was great.”