Safely connecting GPIO input to output
You connect pin b "Input" to a pull up or pull down to force a known state incase pin A "output" is in a floating state. You connect pin a with pin b with a high ohm resistor of 10k~100k ohm resistor to prevent a high current flow if pin a and b are both accidently outputs with different levels. That's to prevent a high to low short.

As most systems can deal with the temporary floating pin,  just the precautionary resistor between pin a and b is needed. A pull down/up pin can result in a unnecessary battery drain.