I believe it downloads the whole video, then extract the sound. At least you're downloading only once, but one of the points of streaming music is not keeping the music on your disk at all.
From what I understand, the audio and video are simply different streams that you can selectively download from the youtube servers. So it is entirely possible to only download the audio, I've done it many times with youtube-dl.
Plus, it's pretty illegal if I'm not mistaken!
Plus, sound quality on youtube isn't very good