The Torah relates that during the flood, the Creator destroyed all living creatures – both man and animal – except for those in the ark. In the statements of the Sages, there are several explanations why the animals too were destroyed.
Rabbi Azarya says in the name of Rabbi Yehuda bar Shimon: Every creature in the generation of the flood corrupted its actions: The dog would go to mate with the wolf and the rooster would go to mate with the peacock. That is what is written: “As all flesh corrupted” (Genesis 6:12). It is not written: As all men corrupted; rather: “As all flesh corrupted.” Rabbi Lulyani ben Tavrin says in the name of Rabbi Yitzhak: Even the land strayed: People would sow wheat and it would produce rye-grass. “He obliterated all existence that was on the face of the earth, from man to animal” (7:23). If people sinned, in what way did the animals sin? It was taught in the name of Rabbi Yehoshua ben Korha: This can be explained by means of a parable of a man who built a wedding canopy for his son and prepared all sorts of delicacies for the feast. Sometime later his son died. He arose and dismantled his wedding canopy. He said: Didn’t I prepare the entire feast only for my son? Now that he has died, why do I need a wedding canopy? So too, the Holy One, blessed be He, said: Didn’t I create animals and beasts only for people? Now that people sin, why do I need animals and beasts? (BereshitRabba 28; Sanhedrin 108a)