Rarely. There is one Austrian Thoroughbred stallion, Shellscrape, who was retired from stud duty after 20 percent of his foals were born with shortened, crooked, or missing tails.
However, there is no "bobtail" gene in horses (or draft breeders would have made use of it to produce naturally short tails). A lack of a tail or a shortened tail is symptomatic of a spinal deformity (or it means the tail was cut off either for "tradition" or because it was damaged and had to be amputated). It can be a symptom of spina bifida.
A docked Clydesdale (image source Kersti Nebelsiek via Wikimedia Commons).
Appaloosa horses often have short tails, but the actual tail (the dock) is full length - they just don't grow much in the way of hair on it.
Donkeys are more commonly born with a short or missing tail, and its possible there is a bobtail gene in donkeys, but it has never been bred for if so.