Why Did God Punish All Of Humanity For The Sins Of Two People?

In this episode, Dr. Betters answers the question, "Why did God punish all of humanity for the sins of two people? It's like punishing me for something my great-great-grandparents did... And what was he trying to achieve by drowning everyone except one family? And why was he mad if he knew it would happen?"