In the era of the Beis HaMikdash, there was a mitzvah called viduy maasros, to go to the Beis HaMikdash twice in seven years to proclaim that we observed all the halachos of maasar, terumah, and the like. Surprisingly, this mitzvah is called viduy. We know that viduy is about confessing one's sins; why is it now used to proclaim that "I kept the halachos"?
For example, by viduy maasros, one says, שכחתי ולא ממצותיך עברתי לא, "I didn't transgress your mitzvos, and I didn't forget" (Devarim 26:13). Why are these words called viduy (confessions)?
Rebbe Shalom Chaim of Koidenov zt'l answers that both Hashem and the person are speaking in these pasukim: The person says, ממצותיך עברתי, "I transgressed your mitzvos," and Hashem replies, עברתי לא "you didn't transgress." The person says, שכחתי, "I forgot to keep the mitzvos," and Hashem responds, שכחתי לא, "You didn't forget." This is because the viduy wipes away sins entirely. This explains why it's called viduy maasros, a confession. Man confesses his errors, and Hashem responds that there is no longer any sin. Similarly, when we say חטאתי, Hashem replies, "You didn't sin," and the sin is totally removed.
Reb Chaim Volozhiner zt'l traveled to his son's chasunah and stopped in the middle of the way to daven shacharis. It was a day that the Torah was read, but the local beis medresh didn't have a sefer Torah. Reb Chaim questioned the Rav about that, and the Rav replied, "The closest sefer Torah is far from here. We aren't obligated to go there to hear the reading of the Torah." Reb Chaim Volozhiner disagreed with this logic but remained silent. He didn't want to debate the issue with the Rav before his congregation. When Reb Chaim returned home after the chasunah, he heard that his personal sefer Torah was stolen. He understood that he was being punished for not demanding that the Torah be read that morning. While he said viduy for this transgression, the police arrived with the stolen sefer Torah. They had found the thief. The aveirah has been rectified, so he got back his sefer Torah.
We don’t say an חטא על om bitul Torah. Bitul Torah is from the severest aveiros; why isn't there a חטא על for this grave transgression? Sfas Emes zt'l answers that we say, חטא על דעת בבלי לפניך שחטאנו, "For the sin we committed before You without knowledge." This refers to when one committed aveiros because he didn't know that the Torah forbade his deeds. Ultimately, this is viduy for not learning Torah. If he had known Torah, he wouldn’t have committed those aveiros. Furthermore, we say, לפניך שחטאנו חטא על עול בפריקת, "For the sin that we committed before you by throwing off the yoke [of Heaven]." The Sfas Emes writes that when one doesn't study Torah, this can be called casting off the yoke of Heaven.
Rebbe Bunim of Peshischa zt'l told the following parable: There was a home that was very dirty. The homeowner tried many times to clean it, but never succeeded. He finally came up with a plan that would solve the problem. He invited the king to visit him at his home, and he accepted the invitation. The king wouldn't enter a dirty house, so the king's servants came before the visit to clean up and prepare the house for the royal visit. The man gained doubly: He hosted the king, and his home got clean. We say in the zemiros of Motzei Shabbos, חטאי על, for my sins, תעבור עבור, come visit me. We earn doubly: Hashem comes to us, and our sins are removed. This occurs on Yom Kippur. Hashem comes to us; therefore, we are cleansed from all our aveiros. This seems to be the intention of the Mishnah (end of Yoma), אשריכם עקיבא 'ר אמר שבשמים אביכם אתכם מטהר ומי מטהרים אתם מי לפני ישראל, "Yisrael, you are fortunate! Before Whom do you purify yourselves? Before your Father in heaven!"