Interestingly, this custom was derived from the story that took place in 390 BCE. At that time, Capitol relied on the invasion of Gauls from the Padus valley.
The Gauls decided to conquer the hill at night. For this purpose, they chose the most steep approach and the moment when the defenders tired of long-term struggles and hunger fell asleep. However, Romans were warned by geese – sacred birds of goddess Juno – about the approach of the enemy. The commander of the defense Marcus Manlius Capitolinus reacted immediately and the attack was repulsed. The defenders not only defended the hill, they drove the enemy out of Rome.
To commemorate this event, the ancient Romans walk carried one of the geese in the litter. Dogs which fell asleep along with people were punished (one of them was hanged).