These are the generations of Noach: Noach was a just, perfect man in his generation (Gen. 6:9)
Rashi comments: This verse teaches us that the most important legacy of a righteous person is his good deeds. A righteous person is not defined by his lineage or by his noble ancestry, but by his own actions and behavior. (Divrei Yisrael)
A just, perfect man in his generation (6:9)
Noah's perfection was that he followed G-d's will completely and with all of his being throughout the day, not just when he learned and prayed, but with mundane matters as well. (Lubavitcher Rebbe)
And it [the flood] blotted out every living thing...both man and animal (7:23)
If mankind sinned, why did the animals have to be punished, too? This is explained by a parable. A person prepared a great wedding feast for his son's upcoming marriage, and procured the finest delicacies for the celebration. Before the marriage could take place, however, the son died. The father then dismantled the wedding canopy and threw away all the elaborate preparations he had made, saying, "What do I need all these for? Now that my son is dead all this is useless."
Similarly, when G-d saw that mankind had sinned, He said, "What use is there for the whole animal kingdom now? I only created them to serve mankind." (Sanhedrin Kach)