The reason the LM317 was designed that way is so that it didn't need a ground connection, and thus could be put in a standard 3-terminal power-transistor package, such as the TO-3 and the TO-220.
The disadvantage of this simple configuration, is that the output current through any resistance between the output pin and the top sense resistor connection will appear as an apparent change is the reference voltage, which can then significantly degrade the load regulation.
Thus that top sense resistor should be connected directly to the output pin, and not to the output connection.