Pull-Up Resistor Current Flow
1) Because the input impedance of the input pin is EXTREMELY large compared to your pull-up resistor (R1 in your schematic R2 in mine). Try to solve this circuit below 5V in series with 10k and 3M. You will see that the voltage drop across R1 is extremely small. Thus, fixing an open state of 5V or logic 1.

2) By providing a ground at the input pin, you short out the input impedance of the circuit. If you put a ground somewhere you put that node to 0V. Therefore, the whole 5V is dropped by R1 (my R2) leaving you with a logic zero on the input.







simulate this circuit &ndash; Schematic created using CircuitLab