“Why does Genesis 6:6 say ‘it repented the LORD that He had made man’ if He knew in advance how sinful man would get?”
You may be thinking that the word “repent” there means God regretted He made man, and my dictionary says “regret” can mean “a looking back with dissatisfaction.” This cannot be the meaning here, however, for it is not possible that God would be dissatisfied with anything He has done.
Like all words, repent can have different meanings. My dictionary defines it as “to feel pain, sorrow, or regret for something one has done.” The word “or” here suggests that God didn’t regret making man, He rather felt pain and sorrow for having done so. The way the verse is worded makes this clear. It doesn’t say the Lord repented making man, as it would if He regretted it. It says it repented the Lord, it pained Him, for their sin caused Him sorrow. The rest of the verse verifies this interpretation when it explains, “and it grieved Him at His heart.”
Sin still grieves the Lord, even after we are saved, so “grieve not the holy Spirit of God, whereby ye are sealed unto the day of redemption” (Eph. 4:30). source