And God saw that the wickedness of man was great in the earth, and that every imagination of the thoughts of his heart was only evil continually.
And it repented the LORD that he had made man on the earth, and it grieved him at his heart.
And the LORD said, I will destroy man whom I have created from the face of the earth; both man, and beast, and the creeping thing, and the fowls of the air; for it repenteth me that I have made them. Genesis 6:5-7
Then God decided not to kill everyone again for the same reason: because the human imagination is evil.
the LORD said in his heart, I will not again curse the ground any more for man's sake; for the imagination of man's heart is evil from his youth ; neither will I again smite any more every thing living, as I have done. Genesis 8:21