Question about reading analog value from photo resistor.

Why can I not put one end of the photo resistor in the 5v pin and the other in A0 and use analogRead(A0) to detect a change of light intensity? From where I have looked online, there are always a 1k Ohm resistor between 5v and the photoresistor and a wire going to A0 from between the resistor and the photo resistor.

This is because the analogue inputs only measure voltage not current. You have to turn the resistance change into a voltage change so it can be measured by passing current down it and turning the current into a voltage by passing it through a current sensing resistor. That is what the 1K resistor is.

How exactly does the 1k resistor do that?

Any resistor with current passing through it will develop a voltage across it. It is called ohms law. The voltage produced can be found by multiplying the current in amps by the resistance in ohms to give the voltage in volts. It is fundamentally how electricity works.

Ohm's Law

Voltage Divider

The 1K is one resistor and the LDR is the other resistor. As the LDR changes resistance in different lighting the voltage between them changes.

I think the OP is falling for the classic beginners error in thinking that a resistor when connected to a power supply at one end and nothing at the other end produces a voltage drop, it does not.

Take your multi meter (and if you haven't got one then you should not be doing electronics) and connect a resistor to 5V. Then measure the voltage between the other end of the resistor and ground. You will see it measures 5V no matter what the value of the resistor is.

Almost 5V.

Best keep that in mind.

E = I x R | E = Voltage (V), I = current (A) and R = resistance (ohms)

There can be no voltage drop across the resistor if there is no current.
There can be no current if there is no return to ground.
If 5V is connected to one side of the resistor and ground to the other side, there is a return path to ground resulting in current flow based on the Electromotive Force "E" , known as "Voltage" to you. No return path, no current.
Google "Ohm's Law"