Question on Photoresistor Circuit with Arduino

I have a very generic question from one of the arduino starter kit project.

Project: Arduino Tutorial 4 - Color Mixing Lamp

Circuit:

I was successfully able to make the connection and run this project. but i do not understand why the output of photoresistor is taken before the resistor and fed to the analog pin, why not just after the resistor?

A resitor is placed becaue a high current should not flow through the photoresistor. but since now a parallel branch is taken just before the photoresistor, how does a flow of high current from the 5V vcc into the photoresitor and than to the analog pin is prevented?

Google "potential divider"

A resitor is placed becaue a high current should not flow through the photoresistor.

No, that is not true.

Analog inputs are Hi-Z inputs and should not see any significant current when you apply any reasonable voltage (<=Vcc). The photoresistor will have a high dark resistance (usually >1MOhm) which will create a voltage divider with the 10KOhm resistor and place approximately 1/100 Vcc or less on the analog pin. When the photoresistor is exposed to light, the resistance will drop. This will make the voltage on the analog pin increase as the light intensity increases. The current in the circuit will be of no consequence to the analog input since it is only sensing the voltage of the divider circuit created by the resistor and the photoresistor. Current can never be higher than 500uA across the 10KOhm resistors so the current requirements of the circuit are quite low.