How can it be explained that God was sorry? What does it mean that He was grieved?
The LORD was sorry that He had made man on the earth, and He was grieved in His heart. (Genesis 6:6)God, who is all knowing, knew before He created the world that the men of the pre-flood world would rebel. He knew before the creation of the world that He would send a catastrophic flood that would wipe out all but eight. God has a perfect knowledge of all events (past, present, and future).
How then could God be sorry? How could God be grieved when the events unfolding on earth were occurring exactly as He knew they would? It all comes down to a very simple answer: Man is fully responsible for his sin (this is clearly taught throughout all of Scripture). God certainly is sovereign, but man is also accountable for his sin. No man can place the blame for his sin at God's feet.
God hates sin. At its deepest, sin is anything that offends God. All sin is ultimately committed against God (see How Bad Is Sin?). Thus the wickedness of the pre-flood world filled God with sorrow, He was grieved that the men He gave air to breathe only returned thankless breaths of blasphemy. All day long God stretched out his hand to disobedient Israel (Romans 10:21). God also strived with the men of the pre-flood world, but they refused to worship Him.
When men continually set themselves against God, their hearts are only farther and farther hardened. One of the greatest evidences of the common grace of God is that men continue to live and breathe. But once a man dies, God no longer strives with him. Such a man cannot reject God's grace because there is no more grace offered. The only thing left for such a man is the judgment of God— it is appointed for men to die once and after this comes judgment (Hebrews 9:27).
The LORD Was Sorry That He Made Man On The Earth (Part 2) - Genesis 6:6
120 More Years of Mercy - Genesis 6:3
The Total Wickedness of the Pre-Flood World - Genesis 6:5
Righteous Men of the Pre-Flood World - Genesis 4:26
Who Are the Sons of God? (Part 1) - Genesis 6:1-4