He did that because he kept thinking about the sacred promise that he had given to his servant, Abraham.