Is this general relativity diagram correct? The following diagram is presented in my professor's general relativity notes:

The diagram comes along with a description of the relativistic bending of light, and the explanation is somewhat clear, though it relies heavily on this diagram being correct, and for starters, I can't really see why the photon would travel following a straight line in the first one, since it is in free fall, wouldn't the photon just curve the other way around since it's falling with acceleration $g$?
Also, why are the two reference frames presented there equivalent? To me it would make sense if a reference frame at rest in a gravitational field was equivalent to one accelerating UP with an acceleration $g$, but I can't understand it this way around.
Any light on this (pun intended) will be highly appreciated!
 A: The diagram is correct. However, you may be misinterpreting it in terms of the equivalence principle.

Also, why are the two reference frames presented there equivalent?

You are correct. These two reference frames are NOT equivalent. The easiest way to see that they are not equivalent is to note that an accelerometer at rest in S will read 0 but an accelerometer at rest in S’ will read g in the upward direction.
However, although they are not equivalent they must be consistent with each other. In other words, if a detector near the ceiling detects the laser in S then that same detector must also detect the laser in S’

I can't really see why the photon would travel following a straight line in the first one

So let’s think about a reference frame that is equivalent to S. In this case an accelerometer at rest in S reads 0 and there is gravity. So the equivalent reference frame would be one where an accelerometer also reads 0 and there is no gravity. In other words, an elevator adrift in interstellar space far from any gravity. Such a frame is clearly inertial and so light will travel in a straight line in that drifting elevator.
Since the drifting elevator is equivalent to S and since the light travels in a straight line in the drifting elevator it also travels in a straight line in S. And since it hits the detector in S it must also hit the detector in S’. Therefore light must curve in a gravitational field.
A: In diagram (a), the arrow labeled $g$ should be attached to the ground and pointing up, because it's the ground that accelerates in this frame.
In diagram (b) they draw the falling lab at two different times. To make (a) more closely analogous, it should have two drawings of the ground, with the ground being higher up on the page when the light hits the far wall. The height of the lab on the page should be the same at both times.
In diagram (b) there is a gravitational field (nonzero Christoffel symbols) and the light bends, while in diagram (a) there is no gravitational field, but they are different descriptions of the same physical process.
