If you read military historicals, you might have come across the term "shavetail" for a green officer. So, where does it come from?
It wasn't uncommon for a new cavalry officer not to be a great rider (I actually once watched the changing of the Horse Guard in London and, uh, they still weren't great riders. Tighten your girths, people). So, during training, they would put the new officer on a calm, older horse that would help teach him.
These horses were marked out by having their tails trimmed short or shaved. This allowed everyone else on the drill field to easily spot the rookies who might, you know, do something stupid, fall off, lose control of their horse, etc.
Obviously, they became known as "shavetails." (Tail shaving on mules, which I covered in another post, means something quite different).