The Creator, the merciful Father of the world, saw the terrible difficulty afflicting the generation of the Flood. He sensed their pounding hearts, inflamed and chasing after worldly desires. He saw how the evil inclination was going to war against every person of the generation. He saw, He looked, He understood that they had no one to lean on for help...
G-d had pity on them and sent word through His prophets (Noah and possibly others) and essentially said to them: I want to help you. I am willing to give you My holy Torah – and by occupying yourselves with it, you will be refined and will merit being saved from all evil.
However, the people of the Generation of the Flood flatly refused to accept the Torah! As the Midrash says:10 “A king by justice establishes the land” (Proverbs 29:4) – this refers to the Jewish people, as it is said: “And you shall be to Me a kingdom of priests” (Exodus 19:6). “But a man of bribes destroys it” (Proverbs 29:4) – this refers to the Generation of the Flood, who would not practice justice...
Rabbi Acha said: The Holy One, blessed be He, sought to give them four things – Torah, afflictions, the service of sacrifices, and prayer – but they didn’t want them! As it is said: “And they said to G-d, ‘Leave us be!’” (Job 21:14) – this refers to afflictions; “‘We have no desire to know Your ways’” (ibid.) – this is Torah; “‘Who is Shad-dai that we should serve Him?’” (Job 21:15) – this refers to sacrifices; “‘And what will we gain if we pray to Him?’” (ibid.) – this refers to prayer.
G-d said to them: What caused you to lose the evening of this world and the morning of the World to Come? It is because you did not accept the Torah!
The Yalkut Me’am Lo’ez writes (Devarim IV, pg. 1590):
“‘Ask your father, he will inform you; your elders, they will tell you’ (Deuteronomy 32:7) – they engaged in Torah and were not delivered into the hand of the evil inclination. ‘When the Most High gave nations their inheritance, when He separated the children of man’ (ibid. 32:8) – [this refers to] the Generation of the Flood and the Generation of the Dispersion, who were destroyed and separated...
Our Sages have said (Bereshit Rabbah 26:6) about the Generation of the Flood: ‘“They die, devoid of wisdom’ (Job 4:21) – i.e., devoid of the wisdom of Torah. For had they occupied themselves with the wisdom of Torah, they would not have sinned. And what caused them to die? The fact that they did not occupy themselves with the wisdom of Torah...”
For great and mighty indeed is the power of Torah to save a person from all evil...’
Since they refused to accept the Torah, the serpent was able to bite them with the venom of its fangs, and G-d decreed the disaster of the Flood upon them.
This is indeed summed up in the teaching of the Gemara (Kiddushin 30b): G-d said to the Jewish people: “My sons, I have created the evil inclination, and I have created the Torah as its antidote. If you occupy yourselves with the Torah, you will not be delivered into his hand... but if you do not occupy yourselves with Torah, you will be delivered into his hand....”
We will now proceed to elaborate upon this teaching of the Gemara...
10. Shemot Rabbah 30:13.