Voltage on analog pin arduino when arduino turned off
All the GPIO pins have protection diodes in them. The are arranged, effectively, like this:







simulate this circuit &ndash; Schematic created using CircuitLab

The internals of the ATMega chip can be visualised for this purpose as a small resistor:







simulate this circuit

If you apply a voltage to the input without anything applied to Vcc you effectively connect the input to ground through the diode and the internals:







simulate this circuit

That means that too much current flows through the diode and potentially breaks it. And that's the least of your worries. The rest of the circuitry in the chip is subject to the same rules - any voltages that can flow back up to the Vcc rail the wrong way through parts of the circuitry in order to get down to ground risk breaking things.

It's almost as bad as connecting the power to the chip backwards. In effect your GPIO pin is acting as Vcc and powering the chip - badly.