What is the legal distinction between DeCSS and the decryption code in the firmware of a DVD player?
One comes from the publisher and is intended to play back the content in an approved way.
The other is a reimplementation of the first, intended to circumvent the restrictions imposed by the first. That's illegal, per the DMCA. It's black-letter law in the US and elsewhere.
In the case of DVDs, the copyrighted code which decrypted DVDs was being licensed to DVD player companies. The code was not open source, and so stealing the key was itself copyright infringement, and more obviously circumvention of DRM.
In this case we have video which is streaming on the open web, which trivially provides for the user agent to download / cache a copy. The question is not a matter of whether that copy is being redistributed, but that the user agent can watch it in an ad-free space whenever they want. You could probably accomplish the same thing, or nearly so, with a browser plugin.
Which is why I make the comparison to uBlock. uBlock is similarly "playing back the content in an unapproved way" and perhaps you could say it is also a circumvention device.
The whole concept of "user agent" is that software on the user's machine -- that they control -- is rendering remote content in a form and fashion chosen by the user. The HTML provided by a remote server is not a legal contract for how that content must be displayed. It is a semantic description of the content, which the user agent can do with whatever it pleases for display to the user.
As long as no redistribution is occurring, the whole basis of the world-wide web is that a user agent can do whatever it wants to the content, including save a copy on the local machine.
So to me the most interesting question is exactly how youtube-dl becomes/became distinct from a user agent.
One comes from the publisher and is intended to play back the content in an approved way.
The other is a reimplementation of the first, intended to circumvent the restrictions imposed by the first. That's illegal, per the DMCA. It's black-letter law in the US and elsewhere.