Many stabled horses perform a variety of repetitive behaviors such as weaving, stall walking, cribbing, headshaking and pawing. These behaviors have been called many different names including stereotypic behavior, stereotypies, stereotypes, obsessive compulsive disorders, vices and habits. Although it may be difficult to know why exactly each horse performs these vices, there may be specific causal factors for these activities in the horse. These behaviors are not simply learned and not simply inherited, but may be a mixture of both. Studies show that some families of horses have a higher prevalence of certain vices, which suggests heritability and genetic components. However, the tendency to perform the behavior only becomes apparent when other risk factors are also in place.
Camargo, Fernanda, "Stereotypic Behavior in Horses: Weaving, Stall Walking and Cribbing" (2014). Agriculture and Natural Resources Publications. Paper 144.