No, copyright infringement doesn't require redistribution. In the UK if I buy a physical CD and rip it to a PC, purely for personal listening, that's still infringement (there have been attempts to change the law but they failed: https://www.gov.uk/government/news/quashing-of-private-copyi...)
I was unaware that copyright in the UK was so extreme. That's unfortunate.
The topic at hand, however, is a DMCA action between two US entities (the RIAA and GitHub) and so is purely a matter of US law AFAIK. My understanding (possibly mistaken) was that the courts here had nearly always permitted making personal copies of otherwise legitimately obtained media. In fact, my understanding is that reversing this status quo was one of the primary motivations behind the DMCA; by disallowing circumvention of protection schemes, in many instances it effectively outlawed the tools needed to make otherwise permitted copies.
That's the issue. If you haven't legitimately obtained Taylor Swift's Shake it Off, you can't argue the copy you made with youtube-dl is a permitted personal copy, in the US or anywhere with copyright laws.
If you did pay for it, then yes you can argue it's a permitted copy (just not in the UK).
(sorry meant to reply to this earlier)
No, copyright infringement doesn't require redistribution. In the UK if I buy a physical CD and rip it to a PC, purely for personal listening, that's still infringement (there have been attempts to change the law but they failed: https://www.gov.uk/government/news/quashing-of-private-copyi...)