Reading the value of a pin used for interrupt

Dear reader,

Not an urgent question.

Using a Nano, on pin 2 I have connected a switch with a pull-up and debouncing circuit
If the switch is actuated the falling edge triggers the interrupt routine. All works well.

const byte left = 2;            //interrupt INT0 left limit switch
//attach interrupt handler for the left limit switch
 attachInterrupt (digitalPinToInterrupt (left), leftSwitch, FALLING);

At start-up sometimes the switch is actuated already, this is checked as follows:


This works fine.

My question why does this work and is it allowed because I have not declared
pin 2 as an input by pinMode(left, INPUT);

Thanks.
Best regards, Dirk

(deleted)