Superficially, it seems a person offending someone else harms him, and that is all. However, if we look a bit deeper, we'll see that the first one to get hurt is really the offender!
The Torah commands “Do not curse the deaf”. The question is: Why? What difference does it make? Can I curse someone who is not deaf?
The Rambam in his Book of Mitzvot (Negative Commandments, Sod. 17) shows us this question stems from misunderstanding the nature of sins between man and his fellow man. It's obvious that it is forbidden to steal, because one should not take the property of others. It is forbidden to harm him or to hurt him. The same is true of cursing. It is forbidden to curse, because it is forbidden tocause pain to a Jew. Someone who hears he's getting cursed is undoubtly hurt and angry. If that's the case, it would seem that he'd be allowed to curse someone deaf who can't hear and won't feel the pain? Even so the Torah forbids this. Why?
Maimonides writes: “… but to curse the deaf, since he didn't hear or get hurt from it, (you may think) that there's no sin in it, but we are told that it is forbidden. This is because the Torah was concerned not only with the one being cursed but also with the one cursing who shouldn't become vengeful and accustomed to anger…”
Maimonides sees the purpose of this prohibition against cursing not only to protect the cursed but also to educate to the curser himself, who will get accustomed to proper speech and proper behavior patterns. The Torah cares about the soul of the curser himself, who corrupts his soul with his vengeance and curse even if the one he cursed doesn't hear or know.
This same principle applies to all prohibitions between man and his fellow man. The prohibition of stealing, for example, is not only to protect the person stolen from, but also to protect the potential thief. The Torah wants him not to spoil his soul with theft!