The concept of sin in Judaism is not one in which you took something from God, e.g. Job 35.6
אִם חָטָאתָ מַה תִּפְעָל בּוֹ וְרַבּוּ פְשָׁעֶיךָ מַה תַּעֲשֶׂה לּוֹ.
If you sinned, what effect did you have on God? And if you acted
blatantly, what have you done to Him?
Subsequently, the classical explanation of punishment in the context of Judaism is that it comes to teach and to rectify. Rb Chaim Shmuelevitz explains this is the reason for the notion of middah keneged middah - "punishment which is a measure for a measure". The person can only know what his sin was and how he must rectify it by identifying the way in which he is being punished. Or, as Rb Avraham Grodzensky said, suffering is akin to prophecy.
Regarding korbanos (sacrifices), and from a more philosophical perspective, when one sins he takes something that does not belong to him and makes this either part of his belongings and / or a part of his persona. In order to repent, the person who sinned must surrender his ill gotten psychological gains to Hashem. From this perspective, the notion of korbanos is that one surrenders himself entirely to God his creator. Since God is the source of all life and being, when one surrenders himself to God, even that which he took wrongly is rectified since it is reabsorbed into God's plan and order for the creation.
See for example Shoftim (13.20) concerning the angel who came to announce the birth of Shimshon.
וַיְהִי בַעֲלוֹת הַלַּהַב מֵעַל הַמִּזְבֵּחַ הַשָּׁמַיְמָה וַיַּעַל
מַלְאַךְ יְהוָה בְּלַהַב הַמִּזְבֵּחַ וּמָנוֹחַ וְאִשְׁתּוֹ רֹאִים
וַיִּפְּלוּ עַל פְּנֵיהֶם אָרְצָה.
And it was when the flame rose up on the altar heavenwards, and the
angel of God ascended in the flame of the altar, and Manoach and his
wife saw and prostrated themselves on the ground.
Since Shimshon would in the end offer himself entirely as a sacrifice to God, when he collapsed the Philistine temple onto himself, his birth was heralded by an angel that sacrificed itself to God.
So in summary
- God does not need to forgive in the sense that we wronged Him, because this is impossible.
- To the extent that we do need forgiveness, however, God does not forgive freely. See for example Bava Kamma 50a - כל האומר הקב"ה ותרן הוא יותרו חייו - Anyone who says God freely forgives, his life should be freely given away.
See further Mesillas Yesharim (http://dafyomireview.com/mesilat.php?d=6)
Rather the general principle is "whoever says the Holy One blessed be
He overlooks things will have his life overlooked" (Bava Kama 50a).
Likewise they said: "if the evil inclination says to you: 'sin and the
Holy One, blessed be He, will forgive you' - do not listen to him"
(Chagiga 16a).
All this is evident and clear. For G-d is a G-d of truth as Moshe
Rabeinu, peace be unto him, said: "The Rock, His work is perfect; For
all His ways are justice: A G-d of faithfulness and without iniquity,
Just and right is He" (Deut. 32:4). For since the Holy One blessed be
He wants justice, to ignore the bad would be just as much an injustice
as to ignore the good. Therefore, if it is justice that He wants, then
He must pay each man according to his ways and according to the fruits
of his deeds to absolute exactness, whether for good or for bad. Thus
"A G-d of faithfulness and without iniquity, Just and right is He"
(Deut. 32:4) which our Sages of blessed memory explained [the dual
terms]: "to the righteous and to the wicked" (Taanis 11a). For this is
the trait [of justice]. He judges on every thing. He punishes every
sin. And there is no escape.
If you ask: if so, for what does G-d's attribute of mercy exist if He
must be absolutely meticulous in judging every thing?
The answer: The trait of mercy is certainly the pillar of the world.
For it could not endure without it at all whatsoever. But
nevertheless, G-d's attribute of justice is not negated. For according
to strict justice it would be proper that:
- the sinner be punished immediately for his sin without any delay whatsoever.
- that the punishment itself be wrathful as befits one who rebels against the word of the Creator, blessed be His Name.
- that there be no possible repair whatsoever for the sin.
For in truth, how can a man rectify what he has made crooked after
committing the sin? If one murdered his fellow or committed adultery?
How can he possibly rectify this? Can he undo a deed already done from
existence?
But the attribute of mercy reverses the three aforementioned matters.
- it grants that the sinner be given time and not be eradicated from the earth immediately upon sinning.
- that the punishment itself not utterly destroy him.
- that the opportunity of repentance be granted to sinners as a complete kindness, so that the uprooting of the will be counted as the
uprooting of the deed. Thus when the penitent man recognizes his sin
and admits it, and reflects on his evil, repents of it and completely
regrets ever having done it, as he would regret [in annulling] a
certain vow, in which case there is complete regret, and he desires
and longs that this deed had never been committed, and pains himself
strongly that the matter was done, and renounces it for the future,
and flees from it - then the uprooting of the deed from his will is
counted to him as the annulment of a vow and he gains atonement for
it. As scripture says: "your iniquity is gone and your sin atoned for"
(Isaiah 6:7) - that the sin is actually removed from existence, and
uprooted through his paining himself and regretting in the present
what he had done in the past.