Re: Well, no problem, I'm going to rip off GitHub code for my own use....
I don't think code repositories should be the point of enforcement. And, let's be clear: youtube-dl itself does not violate copyright. And, as others have noted, there's nothing in the code that can't be replicated relatively easy or actually break the law.
DMCA granted sweeping powers to rightsholders whilst exempting the platforms that facilitate copyright violation. If YouTube were to have been liable for the copyright violation, things would have developed differently. As it was, the liberal licensing helped establish YouTube's position worldwide and reinforced the largely US cultural hegemony. You could even argue, though I won't, that going after TikTok is an attempt to defend that hegemony.
As things stand, the last few years have shown, that, although copyright violations persist, the market has responded well to subscription models such as Netflix and Spotify. Whether this is good or not for artists is debatable but it does underscore the point that people will pay for convenience, something that Andrew identified early as people moved from CDs to MP3s and I seem to recall some research indicating significant uptick in revenues as well.
You will never entirely get rid of copyright violation, so you need strategies to minimise the suspected loss in income. I've still got cassettes of stuff I recorded off John Peel but at the same time I was buying a lof of music and I've bought more in the last two years than in the previous ten (or possibly twenty), though I don't stream. Pleased to have discovered Bandcamp (15% handling fee) recently to assuage my conscience, though I can also live with the guilt.