The point of the Torah is not that great people are saints who never do wrong. They are ordinary humans who are imperfect beings and capable of serious mistakes.