In a conventional diagram of the geometrical optics of any lens or mirror, the line through the source parallel to the axis of the optics does not necessarily represent an actual ray, but rather is included as a way of easily identifying where the image is located. It is used because the optics is assumed to have the property that all rays from the source to any part of the lens (or mirror) are bent in such a way as to converge on some other point (the image) and the mathematical form of the rule describing how this bending occurs makes sense for all points in the plane of the lens (or mirror) regardless of whether or not they are actually on the lens or mirror (and so regardless of whether or not the deflection actually occurs).
It is actually possible to calculate the angle of deflection for each ray (either by an algebraic formula or a geometric construction), and so to just use rays which pass through the lens (such as those through T and B, which I have shown as solid lines in the picture) without any reference to the imaginary ray (shown as a dashed line in the picture) which would bend at H if the lens was big enough; but the formula or construction is simplest for that imaginary ray and it works just as well as any other for determining the image point.