Rashi’s words about Noah (Gen. 6:9) come to mind every time we read the story:
Noah was “righteous in his generation” and had he lived in a better generation he would have been even more righteous; alternatively, it was only in his generation that he was righteous, and had he lived in a better generation like Abraham’s he would not have been considered at all.
Why mention Noah and Abraham in the same sentence? Because each had his own way of handling his situation. Noah was so different from his contemporaries that he had to shield himself from them; Abraham saw the people of his time as a challenge and he tried to make them more righteous.
This is the conventional explanation, but it’s unfair to Noah. Using Reinhold Niebuhr’s words, he was a “moral man in an immoral situation.” No-one had faced up to the problem before Noah’s time and Noah was not even aware of an alternative or better way of facing a morally hostile environment.
Yes, Abraham was more morally sophisticated, but he had the memory of Noah to guide him. He knew what Noah had done, and he worked out in his own mind that there was another, morally superior way of acting.
We are all made by history, but Noah was the one who had to make history and establish a basis for Abraham to consider and improve upon.