Similar thing happened to me. I'm turning right at an intersection where catty-corner is large c-store wtih entrances from both roads. I have the green light, but a girl turning left opposite me takes it and just whips thru the intersection. I get a little steamed and jump in behind her. Suddenly, it's all brake lights and I'm grabbing a fist full of front brake and rear. Two cars in front of us stops to let out a truck/trailer combo from the c-store. Why they did this, I have no idea and of course neither did the girl who cut me off. I stop in plenty of time, she comes within inches of the car. Now, I'm looking in my rear window at a pickup steaming down on our stopped group. I'm planning my exit strategy but he stops in time. There's no way to predict these scenarios but it reminded me to practice some early season panic breaking and not to day dream or worse get the red haze. I was sort of going after the girl who cut me off and that's just not worth the potential outcomes.
Bottom line to me - practice some panic breaking and don't let my emotions compromise my safe riding.