Confession is not primarily something that God has us do because He needs it. We need to confess in order to heal and be forgiven and changed. When we confess properly two things happen. The first is that we are liberated from guilt. The second is that we will be at least a little less likely to sin in the same way in the future, than if we had not confessed. Sin will look less attractive to us.
John Ortberg
John Ortberg, 2002, The Life You’ve Always Wanted, Grand Rapids, Michigan: Zondervan Publishers, p.129-130