My son relayed this to me a few days ago.
When he was in yeshiva high school, the principal would enter each classes a few days before Yom Kippur and tell all the students that he was sorry if he may have hurt someone's feelings.
My son, asked me (he's graduated the yeshiva several years ago) that in hindsight, he thought that this was an ingenuous apology because most of the time he was enforcing yeshiva rules that my son didn't like, and he (my son) knew that he would be doing the same thing next year, anyway.
After telling me this story, I wondered, myself that there are numerous times throughout the year when I am in a similar situation as a father. I have to enforce curfews and certain rules in my home. My kids are assigned certain chores during the week. If they don't do it, or I find they're lazy, etc. I "rebuke" them and sometimes punish them. If I didn't enforce these rules, I'd be a negligent parent and I would have an unruly child. My child's feelings are sometimes hurt when I enforce these rules.
So, did I sin by merely causing someone else's discomfort, tangentially? I didn't intentionally try to harm his feelings, because enforcing a policy applies to everyone, equally. It's that the person resents following the policy, and then is offended when I have to penalize that person for not following it. Do I still need to apologize for this?
Part of the teshuva is that I don't repeat the same action. I know already that I would continue following enforcing the same policy in the future. So, wouldn't apologizing be pointless and be insincere, in such a case? It would almost be like lying or creating a false impression.
If it helps readers understand an analogy - It's like when politicians offend someone and afterwards say "I'm sorry that you were offended by what I said." That's not at all the same as saying, "I'm sorry that I offended you by what I said."