My "unpredictable" incident was with a military working dog (I know, not a typical situation to begin with).
I was visiting his handler at her work and she took me to the kennels to show me her Belgian Malinois. Beautiful dog, can't remember his name (chili?). We stood at the door to his kennel (chain link) and she called him over. He got up and, looking right at me, trotted over tail and ears up, tongue out and kinda bouncy. When he was about 3 feet away he went from cute, widdle puppy into a full-on, ears back, snarling leap for my face and slammed into the gate. She used her voice commands to back him down but she hustled me out of there quickly.
I have no idea if I made some unknown move or what exactly triggered his change in response. My mental attitude and posture was the same as I use with all friendly looking dogs, googly "good boy", because she was always saying what a sweetie he was.
Whatever happened, it was not of MY conscious volition. Something unbeknownst to me triggered the dog and, had there been no fence, I'd be missing a face.
I am not prepared to leave my or other's safety up to the will and decision of a thinking animal. Especially one that starts out showing aggressive, not playful aggressive (yes, I can usually tell the difference), intent.