In 7:7 it says Noah and family went into the ark "מפני מי המבול" - because of the waters of the flood.
Rashi says Noah was a man of little faith. Sure, he was righteous and moral and did what God told him (build an ark), but he did not really believe the flood would come until he was forced to go into the ark because of the waters.
I would like to suggest another reason why Noah waited until the waters were right there before he went into the ark. I think he wanted to give the people as much time as possible and as many chances as possible to repent and join him. Once he would go in and shut the door, that is it. They would not be able to get in. By delaying his entry to the last possible moment, he was giving them more time and more opportunities to repent and join him in the ark.
Whether he was man of little faith or not I do not know (Rashi says he was), but I think he loved mankind and tried to give them an extra chance even if it meant his only going in at the last minute and putting himself at risk.