It invites a relationship. No matter how rough or rude, God engages our response. First of all, He encouraged Cain to be more confessional about his feelings. Confession does not happen in a vacuum. God always listens.
Confession is a way of naming our sin and telling our story.
What is not confessed controls us. What is confessed is easier to master because we are in open dialogue with God and others. Second, God was warning Cain that unconfessed and unmastered anger is sinful. God wanted to show Cain how to dominate anger and not be demonized by it. Finally, mastered anger invites peaceful resolution and Godly relationships.