Moses told God that the people had sinned greatly by making the golden calf. He asked for his forgiveness. If they could not be be forgiven then he offered his life for theirs.
This raises some interesting questions. Does God go down to having a record of all of our lives?
Is your life that valuable to God?