STM32 enabling clock for port C sets IDR bit 1
The pin is connected to something that makes the pin voltage to be high enough for the pin to read as logic 1, but state cannot be read until peripheral clock is enabled so it will read logic 1 only after enabling the clock.