I'm guessing youtube-dl might be a really strong case for GitHub if they'd happen to get sued, so it makes a lot of business sense to take a stand on it. The get much needed goodwill from the developer community and get to send a strong message they're not interested in being the messenger for weak DMCA claims.
GitHub/Microsoft management deserve credit for recognizing the long term value (to them) of pushing back hard against frivolous DMCA claims.