With the Rotties, I'm pretty syre it was kept short to prevent their tails from getting stepped on while droving Cattle and was also docked to remove a 'handle' from the dog while guarding. With Weims and a few other sporting breeds, it was strictly to prevent the tails from getting hurt and/or broked but they left enough there so that they could still properly point and have somewhat of a rudder while swimming (this is what I was told by a Weim and Vizsla owner once). A lot of the breeds you see today who are docked extremely short (ex: Rottweiler) weren't docked as short a long time ago, judges for conformation shows just seem to prefer the short tail I guess so gradually they started docking shorter. As far as the Boxer and Doberman goes, I'm pretty sure they were also docked to get rid of handles as they are/were used as guarding breeds. Many Terriers were docked to prevent tail breakage but were left long enough to grab as a handle to get a dog out of a hole. All of this is just what I've been told over the years, and what I've read.
Some breeds are natural bob tails. I think those would be the Old English Sheepdog (not sure if any are born with long tails, but I know a lot are natural bobs)), Catahoula Leopard Dog (some or born with bobtails, some have full tails), Australian Shepherd (again some are, some aren't), Pembroke Welsh Corgis (some are, some aren't), and a possibly a few others that I can't think of right now.