Well the input impedance of PC soundcards can be as low as 1500 ohms according to one reference I found. You can't expect a line level output to drive that effectively, particularly if it has output coupling capacitors. So the headphone output will certainly give a better result into that sort of load.
But increase the input impedance up to levels of typical amps, which is 10kohms and higher, the line level will start performing much better.