I was biking today afternoon on Dolores Street and I got passed by a car not more than 15 cm away from my body. That was not very pleasant and it was definitely dangerous as both me and the car were very fast at that moment. (Moreover, there are two lanes going on Dolores in each direction and there was not that much traffic on the street, so the car could have easily used the other lane than the one on which I was biking.)
As the car stopped on the red light and the window on the driver's site was open, I decided to explain to the driver that it is very dangerous to pass so close to cyclists and ask him/her to pay more attention to that in future. I did it as kindly as possible and got yelled back, that this was a street and not a bike lane!!!
That would explain a lot. If all car drivers think that bikers are using "illegally" streets, that would explain why they are so aggressive and not friendly towards cyclists. That also shows that this particular driver (a) did not study properly for her driver's license exam and (b) never rode a bike in the city (as then she would have known that it is impossible to bike only on bike lanes).
Another problem are bike lanes themselves. There are many of them in SF, which is great. Unfortunately, they are designed in the way that you bike between moving cars (to your left) and parked cars (to your right). It happens regularly that the door of the parked car opens just when you approach it. I have no idea how it happens. Is it because drivers do not look in their mirror before they open the door? Or is it so difficult to see a bike? Or they just do not care?
On a positive note I wanted to say that I realized today that bike routes are very well planned in SF. Whenever I was biking somewhere and a hill in front of me was getting steeper and steeper, just before it reached "you got to be kidding"-steepness, the bike route would change its direction in such way that extensively steep hills would be avoided.