Something similar happened to a classmate of mine. A rapist broke into her house through a window, she turned on a light and he was standing there with a weapon and his pants undone, but when her Boxer dogs got up she screamed and grabbed her phone, he chickened out and fled.
Maybe not so strange. My dogs know when I am calm or upset... and react according to my behavior. Dogs are experts at sensing our human emotions. Since the victim's Aunt said Purple never had a history of aggression but was protective of her home and family, I think the attack mode came when Purple sensed that this human with her Mom was not a "welcomed friend" because of the fear being given off by the victim at the time, Purple sensed fear from her human for this stranger and then reacted accordingly to protect.
Good dog Purple! Its great to see a positive pit story.
Dogs know. I recently got upset on the phone - very upset, and Madix started growling and looking around and backed up to touch his back up against my legs. Like he's protecting me from whatever the threat is, even though he can't see it. I've seen him respond to something as small as a change in my facial expression, an eyebrow raise, or even the direction that my eyes are looking - if I was screaming, or acting scared - I have no doubt that he would "know" I was scared...