"Sorry" is an expression of sadness or regret.
"I'm so sorry that your Dad died"
can mean, "I liked your Dad a lot and will miss him"
or
"I feel sad that you are most likely feeling grief, sorrow and maybe a whole range of mixed and uncomfortable feelings" (<---an expression of compassion and empathy).
Or
It could be just a ritual and polite expression; the thing a person "should" say whether they feel it or not.
~
In English, polite expressions are required far more than in most other languages.
"How are you?" is the polite thing to say when greeting someone you already know.
"Well, thank you, and you?" is the polite response.
(Only real friends tell each other how they really are.)
Please is expected for any request, no matter how small.
Thank you is expected for all gifts, services or favours, no matter how small.
"You're welcome" or "don't mention it" is the polite response when someone says thank you.
"Please excuse me", "forgive me" or (less commonly) "pardon" is expected when about to cause any possible inconvenience, no matter how slight - for instance, for coughing, sneezing, interrupting while someone is talking, disturbing someone, etc.
"I'm sorry" is appropriate after accidentally bumping someone, or for any mistake.
~
Some other situations for expressing sorrow:
An official might say, "I'm sorry to have to do this but it's my job," for instance when arresting someone for involuntary manslaughter or even a murder in self-defence. The due process of the law has to be followed, even though the circumstances are such that the officer might see the action as forgivable.
A sister might say, "I'm sorry, but I can't take you to the airport tomorrow. I'm taking Mum to the eye surgeon." Here, the sister would like to help, but another task must take priority.
A driver with kids and pets in the car gets distracted, fails to stop at a T-junction and runs into the side of a car. He says "Sorry" to the driver he hit, exchanges details. In this case, the "sorry" is more than an expression of regret; it indicates acceptance of responsibility and willingness to pay for the repairs.
~
English is a tricky language. Much depends on context.
But also, many people use it sloppily -- they don't bother to say exactly what they mean. It's not deceit, just a kind of unconscious and habitual laziness. They rely on the listener to interpret correctly -- which is always risky -- one of the most common causes of misunderstandings.