Horses break wind through their anal glands, and also excrete a liquid that is reabsorbed by the body. It has been suggested that horses can smell when other animals are near them (even humans) and decide to defecate as a defense mechanism.
Watch This Video: