is it illegal to listen to music on youtube?
Who said it was legal to listen to music on YouTube for free? It is against YouTube's Terms of Service to upload copyrighted media that doesn't belong to you, but the law won't stop you or penalize you for listening to the music. The law only penalizes you for uploading the music.