Pick the bugs out of the wronged party's fur. There are a plethora of works on reciprocal altruism and how society depends on it. The apology is a way to repair the perceived damage in a relationship so the wronged person would let you back into their circle of reciprocal altruists.