The safe and courteous way to handle an encounter with stock (horses, donkeys, etc.) is to step off the trail to the downhill side, and also to talk to the riders. This helps the animals know you are a human and not a predator, and it moves you clear of their path should they spook. Horses are prey animals and may be sensitive to potential threats from above them, and may also be confused by people wearing large backpacks. (They also tend to bolt uphill when spooked.) Allow them all to pass, keeping in mind that less-experienced or problem horses are likely to be placed last in line. I also suggest giving the rear of any horse a wide berth. They can't see what you're doing back there, and you don't want to risk a kick.
Generally speaking, right-of-way rules tend to favor the least maneuverable. In this case the 1,000 pound quadruped wins, not just from a maneuverability standpoint but also due to unpredictability (it might spook, bite, kick, or otherwise ignore its rider). In terms of the priority of cyclists vs. hikers, there is occasional animosity between the two groups that may have affected the rules, similar to how many ski resorts heavily restricted snowboarding when it was first starting out.