Very good question and this is something I struggle with also. I don’t like strangers taking my photo and for that reason I am also very hesitant about taking photos of strangers. I agree with Mick, it is good manners to ask and to the honour the decision made.
I spent some time travelling around SE Asia a couple of years ago and had some awesome people photo opportunities presented to me. However I found when I stopped to ask permission the person would then pose for me and I lost the natural spontaneous shot I was after. I like the idea of taking the shot first then asking, but this doesn’t always work either. I was riding a bike past and stopped to take a shot of this barber working in his barber shop, (in Cambodia) an open tin roofed shanty with dirt floor, amazing photo, but the guy became very angry and shook his fist at me, no point asking as he made his feelings pretty clear, hey, I couldn’t make those pedals go fast enough to get away and I felt so guilty I deleted the photo.
I guess it’s just another hazard of photography, just like the light and other conditions, sometimes you get the shot you are after, sometimes you don’t.