Historically, tail docking was thought to prevent rabies, increase a dog's speed and prevent injuries. For hunting and herding breeds, tails could collect burrs and foxtails, causing pain and infection. Herding dogs with longer tails risked being caught in gates behind livestock.