According to a well-known interpretation, a text that begins vay’hi (“and it was”) indicates trouble and sorrow (Meg. 10b).
This comes to mind when the Torah tells us, “And it was (vay’hi) that Noah was 500 years old” (Gen. 5:32) before it relates Noah’s progeny.
The Midrash asks why Noah took so long to have children when other Biblical figures begat issue at a much earlier age.
It posits a view that if Noah had children earlier, they might have become wicked like their contemporaries and would have been destroyed in the Flood – or they might have remained righteous, in which case Noah would have needed to make a number of arks in order to save them.
He therefore waited so that at the time of the Flood they were less than 100 years old, which in those days was the age at which a person was deemed responsible for their own deeds.