Built-in LED lighs up spontaneously
You do not need a resistor in the circuit. Just connect the devices together directly as shown in the tutorial you link to. They are both 3.3V devices and operate perfectly together with no additional components.
Reading an analog value from a clock signal is pretty meaningless anyway, so there's really no point in your experiments at the moment. They prove nothing.
As to why the light came on - that is most likely because the ESP is configured to use that LED to indicate the WiFi status or something similar.  The thing with an ESP32 is there is a whole lot more going on than just your code. Your code is just one thread in a complex system.