Part I: Why does this happen and how can I avoid it?
This happens because the world is full of idiots who don't follow the rules of the road. Stop means Stop; Use a Crosswalk when one is available; Drive on the Right. These are basic rules you're expected to follow; they are also laws. When these laws are broken, accidents happen.
For example, if you hop out of the bushes and into the road on your shiny BMX roadbike, you're going to get run over. While your rich Daddy's high-powered lawyers can and will sue me back to the stone age, you're going to end up paralyzed at best.
Likewise, if you don't wait your turn at the intersection, the ideal scenario for you is one where I give you the bird. The worst-case scenario is you t-boning me and having blood on your hands. Sure, your lawyers will clear you of all wrongdoing, but you will still have killed a man.
The best way to avoid this is to follow the law. It's that simple.
NB: I refer to rich parents because these are behaviors exemplified by Stanford students, most of whom are spoiled vieux-riches.
Part II: Supplemental Rules of the Road.
These are more as comic relief, but do keep them in mind.
1. If you have to play music with the windows down, keep it non-vulgar. Something about the n-word makes me itch for a lynching, and you're the lynchee. (This applies regardless of your race).
2. If you're crossing the street while using your phone, I can run you over while using mine.
3. If you're high, I don't need to know. If I know, the cops know.
4. What a man does in his castle is nobody's business but your own. The road is not your castle; please do not do your business on the highway.
5. If you talk smack about me, do it in English so I can respond.
6. Maybe don't jam out to the Soviet National Anthem.
6a. Don't sing to it, for god's sake.
7. If you're going to use the red light as a coffee time, be ready to put the cup away before the lights change.
8. If you have a baby in your car, the windows stay up. Period.
9. If you jam out to "Drive my Car", and you have a nice car, be prepared for the cops to actually drive your car.