Raspberry Pi and Buttons

There are many  websites that will walk you through how to add a push button to a raspberry Pi.  However, I only saw one that said you should add a capacitor.  I thought that was a bit over kill for a peace of wire that is about 20 cm long.  How could that act as an antenna and receive random transmitting singles? 

Then I built the intermittent fan controller, which uses 20 cm of wire as an antenna to allow the signal from toggling the GPIO pin on and off  to  go from a reach of 3 inches to over 30 ft.  That is when it dawned on me that you should add a capacitor to a push button.  Those wires really can act as an antenna.