I'm not sure, but I would bet the idea is that because you picked money off the ground where one sometimes find scat or fecal matter, that your action was being compared to retrieving "poop."

After all, in German the word for money can be the same as the word for feces: "gelt."