Like almost tools in 3D software, the Loft in 3ds max has built-in some logic. We can ignore it and assign the path to the path or shape to a shape. The results might be predictable or unpredictable.
If you selected the vertical line before selecting the Loft Compound object and then selected the same line as a path, you added the path to the shape. Shor to say:
1. We must select any spline object to activate the Loft Compound object.
2. Once the spline is selected and the Loft activated, the UI appears in the Command Panel.
3. Now, the user must decide whether the previously selected spline is a shape or path. The following selection will create a path or shape for the Loft based on the answer.
The "error" of the Loft direction you see in your example is related to the fact that you applied the same line as a shape to the already-picked path. This changed the direction of the loft after adding another spline as a second shape. This overwrote the previous shape (a line).
I would suggest reading documents and watching a few video tutorials for more details. One of them I found handy:
Help: https://help.autodesk.com/view/3DSMAX/2023/ENU/?guid=GUID-4CCA4890-83E8-41C6-9FFB-0A3959194CCA
Videos:
https://www.youtube.com/watch?v=vbwlg_IfuSc