pullup/down resistors set input polarity when the input circuit is open
such as if you have a button from ground to an input (active low)
when the button is not pressed the input circuit is open, neither high or low is reaching the input pin, so the input polarity is ambiguous
in that case you need a pullup resistor to hold the input high when the button is not pressed
if you were to put a pulldown resistor it would hold the pin low, which would activate the active low input continuously, such that the button to ground would be redundant and ineffective
it lets you set the default (safe) value on each input pin
if an input is open, and has no resistor, it can fluctuate and cause random input signals/errors