Sometimes English speakers say "I'm sorry, but..." when they're actually not sorry at all. You can say "I'm sorry, but..." in an angry way:
I'm sorry, but you need to stop feeling sorry for yourself and go find a job!
I'm sorry, but you need to leave.
Why do we say "I'm sorry" in these situations? You can think of it as something like "I'm sorry for saying something mean or aggressive, but I need to say it."