There are many songs in different genres that relay the same message as hip-hop in a different way. There are many country songs about men getting drunk and beating or shooting their girlfriends or wives but they are not criticized for it. However, rappers sing about hard times and growing up in a different culture, are criticized very harshly by people and the media.
Most people who criticize rap are not even musicians. If you think that anyone can rap, then you would be right. Just like everyone can play baseball, but few are really good at it. More often then not a rap does have a melody and takes a lot of work for word phrasing and timing. Along with ideal tone of voice. Plus rap music instrumentals are the most challenging to make upbeat and have a good balance. Talking a hundred words a minute is no easy task.
When someone gets on the stage, and says 100 words quickly, often about whatever boring topic they choose, and then retreats, they call that music. They call these people musicians, when they don't present any form of music that has any type of melody whatsoever. Some of them do it to be "activist", but they are no more than people who are just too cowardly to go up and protest. And it is funnier, because these people get paid more than people who are in helmets, defending their native lands!