David knew forgiveness of sin was a big request. In Psalm 25:11 he asks God for forgiveness even though he knew his sin was great, For the sake of your name, O Lord, forgive my iniquity, though it is great. Even in the day of David, he knew the Messiah was going to fix all this and become the perfect and final sacrifice, which Christ fulfilled. We are forgiven and free because of Christ and His love for us.