With upsampling, you can interpolate that waveform to *approximate* a sine wave. Obviously, the best solution would be to do the original recording at a extremely high sampling rate.
I don't think this explains it. A 20KHz square wave sounds like a 20KHz sine wave on your stereo. This is because, in the frequency domain, a square wave is the same as a sum of (even or odd -- I forget, probably odd) harmonics. The first harmonic is 40KHz which your stereo cannot reproduce. The 2nd is 80KHz, etc.
All DACs also have low pass filters on the output to attenuate these unwanted harmonics.
I don't disbelieve that it sounds better but I don't think this explains it.
Andrew