Confession to appropriate priesthood authorities is an evidence of one’s contrition and a sign that the sinner has no inclination whatsoever to hide the sin any longer. “He that covereth his sins shall not prosper: but whoso confesseth and forsaketh them shall have mercy” (Proverbs 28:13).
The Savior has reminded us that “he who has repented of his sins, the same is forgiven, and I, the Lord, remember them no more. By this ye may know if a man repenteth of his sins-behold, he will confess them and forsake them.” (D&C 58:42-43; cf. D&C 64:7.)