A lot of hatred for particular genres of music is based around an attempt to fit in or follow certain social rules. Rap music in particular, when I was growing up, was often treated as "degenerate," "violent," and "glorifying sin" by the white Christian community surrounding me. Needless to say, these things were 100% rooted in racism, but when you're trying hard to be a good kid, that shit really worms its way into your brain. It manifests into a hatred of a genre and a distrust of people who like that genre, which inevitably assists the building of racial prejudice. You can still occasionally catch the more overt racists complaining about how Black people are "ruining their daughters" through rap music (often times they don't even have children, they just like to claim ownership of young white girls).
I did, of course, find my way out of that cycle, and if any of that sounds familiar to the rap haters, maybe put a little more thought into why you actually hate rap. It doesn't have to become your favorite genre, but you should question the nature of an aversion to rap.
And also, sometimes hating music is just "popular." Most of the hatred of country music is because it's "cool" to hate country music. Now granted, a lot of post 9/11 pop country has a lot of legitimate criticism, but country music is a lot older than that with deep roots in working class struggles, which has also helped manifest a distrust and hatred of it by the owning class, the petty bourgeoisie, and those workers with aspirations of being a part of the owning class.
It became especially popular when I was growing up to tell people you hated country music. People who had never listened to any country music would look down on you for listening to any flavor of country. It was a pretty common social rule, particularly within white middle to upper-middle class kids and teenagers, and was also frequently lumped in next to rap. "I listen to anything except rap and country," was something I heard from so many people who definitely never listened to either and had no clue why they didn't except that it was popular to not listen.
If you hate a genre of music, ask yourself why. Sure, we all have different tastes and that's okay, but a lot of times our oppinion of certain things is ultimately based on social pressure that's often rooted in some kind of prejudice. If you think that might be the case for you, check out some different artists in the genre. Ask for recommendations, especially more obscure recommendations that won't be as likely to be biased by having heard them before while hating the genre.