I've been to all of those areas and though they are nice, they are not as safe as I'd like. Especially compared to other major international cities.
The clean and safe neighborhoods of SF are livable (I loved living there), but at least personally I have found them to be notably sketchier than any other city I've ever lived in and I agree with you that the contrast is not particularly close. >95% of the shoplifting I've personally witnessed in my life happened in SF despite it being a relatively small part of my total life experience.