The story
Originally United States Army slang, said to be from birds pecking at cattle and horse dung.
First known use, by meaning
- from 1940s Not deserving serious consideration; unimportant; useless, worthless.
Etymology from Wiktionary, CC BY-SA 4.0.