A person tells another person "sorry" when they truly feel bad about something they did or feel bad for the obisit person. When someone explains they're "sorry" they regret what they did.
I'm sorry for that you lost your dog.
Sorry for making you mad