According to a popular fan story, the Cogs trace back to Scrooge McDuck, Donald Duck's uncle. The tale goes that Scrooge wanted to invent something that would change Toon history forever, so he set out to build such a device with his fortune.
The problem came when he slipped on a banana peel while holding a pencil and some documents. The pencil fell right into the robot, and when they switched it on, it went haywire, babbling "whap we whap" and leaving the inventors dismayed. That rogue Cog ran off and even kidnapped Scrooge. The short version of the legend is that Scrooge McDuck is the accidental creator of the Cogs, which is why you never see him around Toontown, and the Cog he made might even be the Chairman.