Etymology
Today it means: A stupid or otherwise undesirable person Full definition →
From cock + bag.
Etymology from Wiktionary, CC BY-SA 4.0.