That diagram shows what's called the "thin lens" approximation.
In real life, lenses have thickness, and light rays get refracted both when entering and exiting the material. But in practice, this thickness tends to be very small compared to the lenses' focal length. Ignoring it makes the equations much simpler.
So in introductory discussions of optics, physicists tend to use the "thin lens" approximation: pretend that the lens has no thickness, and is just a plane that magically changes the angle of any light that touches it. This makes it easier to discuss the most important properties of lenses (the way they focus or un-focus light to make images) without getting bogged down by smaller details.
That's what's happening in this image: the diagram-maker is pretending that light only gets refracted once, when it passes through the magic plane, instead of twice, when it enters and exits the glass.
(Of course, like any approximation, the thin lens approximation isn't perfect. Ignoring the actual details of the lens material means you can't predict things like chromatic aberration. So this approximation is mainly used to get an intuition for how lenses work, and isn't actually used in, say, manufacturing real lenses for cameras.)