We have a guy who is able to to open any stall he wants, and he opens the stalls of other horses that he likes. As evidenced by the fact that he would open his own stall and then let a certain set of horses out.
If that wasn't amazing enough... He got into a conflict with another horse (nipping at each other), and he stopped letting that guy out of his stall.
Livestock is... complicated. Horses collectively are unreasonably stupid. But some individuals are amazing. Before I came into contact with them, I thought they all were "Glassy eyed dinosaurs". It's a weird trick because you see people make declarative statements about them, up to and including they aren't able to recognize people. But, when you work with them its absolutely clear they have preferences. They prefer certain riders and certain activities.