Our Gemara on Amud Aleph discusses the legal principle of when confessing mitigates financial penalties:
אִיתְּמַר: מוֹדֶה בִּקְנָס, וְאַחַר כָּךְ בָּאוּ עֵדִים – רַב אָמַר: פָּטוּר, וּשְׁמוּאֵל אָמַר: חַיָּיב.
It was stated with regard to one who admits that he is liable to pay a fine, and afterward witnesses come and testify to his liability, that Rav says he is exempt, and Shmuel says he is liable. Even according to Rav, his admission must obligate him in some fashion for it to exempt him. The Gemara describes a scenario where his admission is moot, so it also does not exempt him from a fine should witnesses later come forward:
If he says: I did not steal anything, and witnesses came and testified that he did steal an animal, and subsequently the thief says: Yes, I did steal the animal, and I also slaughtered it, or I also sold it, and witnesses came and testified that he slaughtered or sold it, he is liable to pay the fourfold or fivefold payment. The reason he is liable is that through his admission he sought to exempt himself from any payment whatsoever. In order for an admission to exempt the perpetrator from a fine, it must include an admission that leads to liability to make some payment.
Sefer Daf al Daf quotes Sefer Ya’alas Chen (Vayikra 16:29-30) asks on the following verses which describe Yom Kippur:
וְהָיְתָ֥ה לָכֶ֖ם לְחֻקַּ֣ת עוֹלָ֑ם בַּחֹ֣דֶשׁ הַ֠שְּׁבִיעִ֠י בֶּֽעָשׂ֨וֹר לַחֹ֜דֶשׁ תְּעַנּ֣וּ אֶת־נַפְשֹֽׁתֵיכֶ֗ם וְכׇל־מְלָאכָה֙ לֹ֣א תַעֲשׂ֔וּ הָֽאֶזְרָ֔ח וְהַגֵּ֖ר הַגָּ֥ר בְּתוֹכְכֶֽם׃
And this shall be to you a law for all time: In the seventh month, on the tenth day of the month, you shall afflict yourselves (by fasting); and you shall do no manner of work, neither the citizen nor the alien who resides among you.
כי ביום הזה יכפר עליכם לטהר אתכם מכל חטאתיכם
For on this day you shall be forgiven to purify you from all your sins
The verses seem to say, “You should fast because on this day you will be forgiven and purified.” But if forgiveness was so sure in coming, the day should be a celebration, as we found in regard to Solomon upon completing the Temple. The Gemara Shabbos (30a) tells us that the Jews did not fast that Yom Kippur, as they received clear indications that they were already forgiven.
Of course if we read the verse less literally, then it is saying, “You should fast because on this day IN ORDER for you to be forgiven and purified.” However, Ya’alas Chen uses our Gemara to explain the verse literally. The function of confession and repentance on Yom Kippur is to forestall punishment, just as confessing in the earthly court prevents additional fines. Yet, since we saw that the admission must involve some liability for payment in order for it to be a valid admission, our confessions on Yom Kippur would not be valid either without a form of “payment”. This is the function of fasting and affliction. Now we can read the verse literally, “Since you are paying out and admitting, you will be forgiven and not held liable for additional punishments.”
In life, sometimes forgiveness cannot be achieved by admission alone. There are times when you have to pay up in some way, and then ask forgiveness. In human relationships too, some betrayals and transgressions may not be forgiven with sincere apologies alone but may need a personal sacrifice beyond the mere admission of guilt.