internal pullup resistors & digitalWrite

When would this one be needed...

pinMode(pin, INPUT);