Comma usage, like all punctuation, is a matter of style for written language. Check your manual of style, either the one you've adopted or the one thrust upon you. The rules in that guide dictate where to place marks to help your readers parse what you've written. The different style guides differ, and they all leave room for judgment, which may have given you the impression that comma usage in English is "fairly free." Pauses in speaking your text, pauses either little or great, don't have much to do with it.
In your example sentence, "Sorry" may be an aside. It may mean something like "I really don't care whether the experience was unpleasant for you or not, but I'm going to pretend otherwise." Such asides are usually set off by commas, so:
Sorry, if this was in any way unpleasant for you, then I hope you
realize it was necessary.
On the other hand, you may have meant "I'm sorry that" and elided the "I am"; The object of your sorrow is generally not separated by a comma:
Sorry if this was in any way unpleasant for you, but I hope you realize
it was necessary.
Both versions are fairly informal.