Today, a “dog robber” is a military officer’s orderly, whose job is to acquire scarce goods, from military equipment to liquor or perfume, often staying barely within the letter of the law. In other words, someone skilled at foraging.
The Oxford English Dictionary traces the term back to 1832, when it meant “scrounger,” and to the American Civil War as an “officer’s orderly or private servant.” An obsolete meaning is “A contemptible person, especially one who steals scraps of food.” Currently, in today’s military, it is used to describe a soldier that makes problems disappear by whatever means necessary.
Jonathan Lighter’s Historical Dictionary of American Slang offers this earlier 1865 explanation: “I believe the origin of it is this: If an officer has such a man, he generally allows him to dine from the leavings on the table, so as the man gets what is the dog’s share, he is called a dog robber.”
Wikipedia says that a “dogsbody,” or less commonly “dog robber,” in the Royal Navy, is a junior officer, or more generally someone who does drudge work. A rough American equivalent would be a “gofer,” or a “grunt.”
And, just to be different, Jackspeak of the Royal Canadian Navy says the phrase refers to civilian clothes. Usually, it specifically refers to a sports jacket and tie.
The Royal Navy used dried peas and eggs boiled in a bag (pease pudding) as one of their staple foods circa the early 1800s. Sailors nicknamed this item “dog’s body.” In the early 1900s, junior officers and midshipmen who performed jobs that more senior officers did not want to do began to be called “dogsbodies.”
There are many theories about the origin of the term, including the use of the term “dog” for enlisted men, which meant that a “dog robber” was someone who took the best of everything away from the dogs to give to the officers. The most likely conjecture is that it comes from a 1800s term for a contemptible person who stole scraps of leftover food that would otherwise be fed to dogs.
The weight of the evidence is for “scrounger.” But the meaning “civilian clothes” is also in use. I have heard a British military man remark to his wife that he had decided to wear his dog robbers to an afternoon tea party.
The big mytsery here is how robbing a dog came to mean civilian clothes. Good luck with solving that one!