Saskia Squirt gun or real gun, I don't think folks are just willy nilly shooting any dogs. They are discussing the really mean one. Which to be honest are just soooooo rare.
I encounter a lot of dogs while out riding. Usually with their owners out for hike. Most of the owners are very attenative to their pets and get them on lesh and secure them. But even the loose dogs, my horses are used to . We often have 3-4 dogs running along our horses, under their feet zig zagging along the trail with us. My horses just don't care about dogs unless they try to nip them.
Most strange dogs bark and retreat. No harm no foul. The rare dog that comes in and tries to nip my horses heals, usually gets kicked. No need for me to do anything but hold on.
But for those timid riders who are nervous about a strange dog upsetting their horses and getting them dumped. The ammonia in the squirt gun will send the dog fleeing and usually not do any long term harm.