When you apologize for doing something wrong, that’s an act of atonement. Many religions have rituals of atonement, such as Yom Kippur, the Day of Atonement, on which people of the Jewish faith repent for their sins.
As a religious act, atonement is an effort to make up for wrongdoings so you can be in harmony with a higher power. Look closely at the word: you can break it down to "at," "one," and "ment." Atonement first appears in English in the 1510s, when it meant "the condition of being at one (with others)." About ten years later, the word shows up with a meaning that included “being at one with God.”