It was some years since that I "re-schooled" myself to scratch and rub my horses instead of patting them. After years, as we all learnt, of patting my horses - and of course the better they performed the harder they got ´slapped´. It took some doing, that´s for sure, but the rewards have been more than worth it. I recently reached the stage of considering putting up signs around our yard to avoid having to explain, but fell short of that when I realised I´d also need to hang an advisory around our horses necks when we are out riding, as people love to come over and give them a smack on the neck as we pass in the street.
Simple observations of their behavior in the herd are explanation in itself as to why patting is an aggressive gesture. They love each other up with mutual grooming. "Scratching" each others necks and backs. They pin ears and gesture a kick when they are upset. They do kick if the offender doesn´t heed the first warnings!
You only have to watch how their skin twitches when a mere fly lands on them, to realise how very sensitive they are (Yet you can scratch them quite hard and they love it), and when they have only known scratches, as most of mine (especially all the babies born here), they readily differentiate between a bump on the nose (if you catch them with your elbow as they swing their head to close) as a reprisal for not respecting your space, to a full out smack as you kill a nasty fly on their flank with no upset and understand it was not an admonishment. Yes, they absolutely do know the difference.