Moshe sacrificed himself in order to have G-d forgive us when some of us worshiped the Golden calf. G-d agreed. Moshe changed G-d’s mind.
“While Moses was still on Mount Sinai, G‑d told him that some of the people were worshipping the Golden Calf, and that He was planning on holding the entire community responsible for not protesting the misdeeds of this minority. Moses pleaded with G‑d to forgive the people; G‑d agreed only to punish the guilty minority, but insisted that His presence could no longer accompany the people. When Moses saw the people worshipping the Golden Calf, he understood that the Jewish people were not yet ready to receive the Torah. He threw down the tablets on which G‑d had inscribed the Ten Commandments, breaking them. He then ascended Mount Sinai again for another 40 days, during which He secured G‑d’s forgiveness for the people. After descending from his second stay on Mount Sinai, Moses asked G‑d to again let His presence dwell among the people, and G‑d agreed.
G‑d told [Moses,] “My Presence will [again] go with you.” Exodus 33:14
Moses asked G‑d to omit his name from the Torah if He would refuse to forgive the Jews. Moses was willing to sacrifice his connection with the Torah for the sake of his people – all of his people, even those who worshipped the Golden Calf.
We can all emulate Moses’ self-sacrifice for the Jewish people. It is not sufficient to simply fulfill the commandment to “love your fellow as yourself”; we must be ready to sacrifice even that which we hold most dear for the benefit of the Jewish people in general and for every single Jew in particular – no matter how far away he may seem at that moment from G‑d and His Torah.1 Likutei Sichot, vol. 21, pp. 175–7.