why does the vector from the light to the surface dependent on fragment position, but the vector from the camera to the surface is independent on the fragment?
The point is, because of the lighting equation. What you need is the vector from the light to the vertex, in other words the light direction relative to the vertex position. This is needed in order to take the dot product between the normal vector and the L vector. This is called the diffuse term and is calculated
float diffuseTerm = (N.L); Where N is the normal vector. L is the light direction. In case of directional light (infinitly far) L will be constant for all the vertices. If the light is not L will be calculated relative to each vertex.
Regarding the camera vector you are in the eye space, which means the camera position is (0,0,0) you can actually think of this
normalized(-fragment_eyespace_position) As this normalized
As this
normalized( (0,0,0)-fragment_eyespace_position)
Because in eye space the camera is actually (0,0,0)