Repentance by the animals – No’ach
Rashi says that Noah and his family could have been saved without needing to build and enter an ark, but nonetheless there was a need to construct an ark – a crucial task that took a lengthy time, decades and centuries, to fulfil – as a warning to the other human beings of that generation who had sinned so grievously.
All this time God was waiting for the people to repent but He waited in vain. Not only for the human beings to repent but even the animals.
Why did the animals – not just the humans – have to repent? Because they had behaved cruelly and without self-control.