Downloading copyrighted music per se is not illegal. This is not the same as intentionally circumventing a digital rights protection mechanism. In some countries (but not in all) it is illegal to download copyrighted music if it was illegally uploaded. But we don't have to assume in the first place that Youtube videos were illegally uploaded. And not to forget that many titles on Youtube are licensed under CC-BY, so in any case they can be legally downloaded and even shared.