The resistor is configured as a "pull-down resistor."
Though, I was curious to know what does that resistor and the wire to ground do.
If they aren't there then what is the pin connected to when the button isn't pushed? Nothing. What is the digital value of nothing? When pins are not connected to anything, they are in a "floating" state. They actually pick up noise from the environment that will flip their value at random.
Pull-Up and Pull-Down resistors force the pin to a specific value when nothing is connected to them.
One behavior I observed is that, I can lit the LED by touching pin 7 with my finger, if those are not present.
Your body is a great antenna for this electrical noise.
Watch this videos on this page to see what it looks like when a pin is floating and when it is pulled-up (the opposite of pulled-down).
http://www.cmiyc.com/tutorials/arduino-pull-ups/