Electronic - Resistor
About
keep the voltage level of the pin GPIO 17 low (tied to ground or 0 volts until the switch is pressed
10K resistor prevents any current from going back to ground
Without a very large resistor like this one, you would short out the raspberry pi. This is not a good condition
when the switch is released again, the potential returns to low
Why bother with a pull-down circuit
Electronic circuits prefer a specific potential, either high or low, when they are allowed to float that is not connected to a pull down or pull up circuit, the result is that the value of the pin can be somewhere in between high and low and this impacts our ability to detected a transition or change in state.
This Circuit use a pull-down resistor, a circuit that uses a pull-up resistor would be tied to 3.3 V or higher, rather than to low (ground)