"Sorry for bothering you" should be used at the end of a conversation. "Sorry to bother you" should be used at the beginning of a conversation. "Sorry for bothering you" works after finishing "bothering" someone, whereas we greet someone with "sorry to bother you."