Noah was found perfect and righteous. In the season of wrath, he kept the race alive. Therefore a remnant was left on the earth when the flood came.