It goes to the idea of cultural capital. That your taste in music is like a currency that buys you access to certain social spheres.
All the fancy rich people like a certain kind of music and art, all the punks like another, or the emo kids or whatever.
And when people are shitting on other peoples' music tastes, they're trying to establish a kind of social hierarchy with them on top. "I hate country and rap" is code for "I hate music I associate with poor and/or black people because I am of higher social standing" even if that's not even conscious. Or like teenage boys hating on boy bands - that's just sexism and trying to claim things women like are frivolous and without value, like whatever shit they listen to is any better.
@Azrael Woohoo, communications classes came in handy! I'm super interested in taste and how that maps to class and intersectional ideas. Why we like what we like is a great idea to explore.