Psalm 3:5 -- Then I acknowledged my sin to you and did not cover up my iniquity. I said, “I will confess my transgressions to the LORD.” And you forgave the guilt of my sin.
Confessing one's sins/transgressions to God gains one His forgiveness. Further, confessing only to God does not constitute a "cover up" of those sins.
Confessing to elders is not about being forgiven. It is about being punished by their manmade rules.