Question:
Why is it that during the Ten Days of Repentance from Rosh Hashanah to Yom Kippur the text at the end of the Amidah and Kaddish is changed from "Oseh shalom" to "Oseh hashalom"?
Response:
According to the Rabbi Yitzchak Luria (the Ari Zal),1 this is because the words "oseh" and "hashalom" each have the numerical value of 381—the same as the name Safriel (when pronouncing, say "Safrikel").
Safriel is the angel whose responsibility it is to record those deserving in the Book of Life. By invoking this angel's name, we express our hope during this time to be included in the Book of Life for the coming year.
Wishing you a good, sweet new year,
Rabbi Eliezer Zalmanov

What about birkas hamazon? So why do we not say "oseh hashalom" in birkas hamazon (grace after meals)?
Because Birkas Hamazon is all about praise whereas davening is about having a one-on-one with HKBH. Therefore, it would not be fitting to mention Safrikel in Birkat Hamazon because we are not asking in benching if we can be written in the book of life. I hope this answers your question 10 years later (I think this is the answer though I am not a Rabbi lol) :)