So horses, donkeys, and zebras are all of the genus Equus. Mules are not a species, since they are the product of the cross-breed between horses and donkeys, and are sterile (therefore do not comply with the biological interpretation of species).
Given that 2 out of the 3 species from the species of the genus Equus are aggressive against predators (zebras see reference and donkeys), it might be possible that the "aggressive" behavior is the ancestral trait of the genus, and horses evolved afterward the behavior of fleeing before fighting. Furthermore, it looks like the "aggressive" trait is dominant over the "fleeing" trait since mules (cross-breeds between horses and donkeys) inherit the aggressive trait. There are no sources that necessarily say that a dominant trait is associated with ancestral (common ancestor) provenance, but for the case of single genes, this is the most likely scenario.
So if we think that horses evolved the trait of fleeing before fighting (being the "aggressive" trait the ancestral one), then one should ask why did they evolve such behavior (why is a cringy word for evolutionary biologists, but serves the purpose here). And this is probably due to the exposure horses had to different types of predators. I wouldn't be surprised if horses had more contact with human beings than donkeys or zebras, thus they evolved this behavior as a way of coping with extensive hunting.
Alternatively, some traits are not "modular" traits that can evolve independently from other traits. More often than not, complex behaviors, like the "aggressive" trait, are determined by a large number of genes, some of which have phenotypical effects elsewhere. This means that if a species has a "selective pressure" for one trait, other traits can also be modified over time as a causal effect of this selective pressure. Horses were domesticated long before donkeys were, and zebras haven't been domesticated at all. Domestication is usually conferred by a process of selectively breeding individuals that express the least amount of aggressiveness, or show signs/traits of "neoteny". If horses were selected to produce neoteny in the species, the non-aggressive behavior might also have been selected as a causal effect of this selective-breeding. This would explain why horses, which have been domesticated way before donkeys have, do not show aggressive behavior as donkeys or zebras do.