Horses will snort loudly when they are frightened too. Oneday, I was riding my horse passed about 200 head of cows that she had never seen (so many at once). They took an interest in us and walked up near the fence. This freaked her out! I think she thought they were predators. She began trembling and snorting quite loudly. And was in the fright & flight mode and HELLO forgot I was even on her back.
She seems to do this when she is alarmed, panicked and excited, but then again she is a flighty arab. So the best thing I can do is to distract and reassure her in these situations.
When horses snort, I'm not real sure if they are attempting to clear their nasal passages to capture the scent, or an attempt to warn other horses of danger, or an attempt to keep the predator at a distance???