Since it breaks God’s heart so much to see His lost sheep run from Him, He showed His grace once more.
Cain had realized that - as a fugitive and vagabond - he would likely be hunted down and killed. So, God promises to protect Cain. We’re not told how God made the announcement - that anyone who killed Cain would be avenged seven times - to everyone else who was alive. It is possible that He spoke the warning so all the world heard. However, the method isn’t important. What’s important is that this proved God was trying to protect Cain, even in Cain’s unbelief.
He wants Cain to see His incredible mercy, so Cain will turn from his own ways of worship and worship God, and receive His forgiveness through true repentance. He is calling out, “Cain, I am having mercy on you. Don’t you understand this mercy can’t come from man’s ways? Return to Me, just as I pled with you earlier.”
Indeed, even today, it’s amazing how much grace and mercy God has. Not everyone gets a lot of chances, of course. However, despite all the evil that has spread over the entire world, there is still enough goodness, enough protection, that even those who turn from God can see His love if they look for it with a heart of faith. Even the greatest daredevil who lives only for self can find himself or herself spared. Of course, they won’t always find that. God’s mercy only goes so long. And, when the restrainer is removed in the Rapture (2 Thess. 2:7), many may find God’s divine protection suddenly gone for those who don’t trust in Him.
God also puts a mark on Cain. Some have speculated this mark may have been leprosy. That is very plausible. Any kind of mark would need to tell others to stay away from him. It would also match the way leprosy is used to signify uncleanness later. The only question is, would others catch it, also? After all, Cain went out and built his own community. Diseases change over time, though, so that isn’t a huge deal. One alternative is that Cain simply became disfigured somehow, so everyone would recognize him, and have the choice to follow him or God. That would make it more analogous to the Mark of the Beast in Revelation, whose bearers swear loyalty to forces opposing God and are condemned. Either way, it showed that Cain had made his choice. God will offer mercy and grace, but will never compromise His holiness. It is through it that we see His awesome mercy, in that He loves us so much, He offers to make us new when we turn to Him by faith. He wants us to come to Him for cleansing from sin by our own free will.