I think it's partly to do with the solitude and loneliness of living in our modern society, which (paradoxically) drives us to seek out company via technology.
Also, as a species, nothing fascinates us more than other people. That's why millions of people can be transfixed watching Big Brother, even if the contestants are relatively unintelligent/boring and having a conversation about crisps.
More specifically around music...
Most of the time I listen to music I'm alone, but it's obvious that music becomes more enjoyable when there's another person (or ideally a lot of people) enjoying the same thing as you at the same time.
There's an especially gratifying effect (whether or not it's simulated to garner views) when you watch somebody listen to something you love for the first time and they're really into it – it's as if you hear this song, which you've filed away on a dusty shelf as 'canonical', through their ears.
As Luka says, this can be a case of getting validation (the cool black guy likes this metal song i like, maybe it isn't so horribly uncool after all!)
But I actually think the great thing about music on youtube, besides there being so much more of the obscure stuff (and stuff that's been manipulated/looped/slowed down etc. by users) is that it puts music into a social context that other platforms e.g. Spotify don't. The comments under videos are one way it does that, and reaction videos are another.