"Just because", no. But:
1. The server has no access restrictions for the Javascript URL, presumably. So, if you trust the server's configuration to match the owner's intent, then the owner was saying "this page is intended for public consumption."
Which is to say, importantly, not only for their customers to view in exchange for their subscription fees (which would put the ad-injector script under license of whatever TOS the customers agreed to), but rather for anyone to view who has no prior relationship with them, for any purpose.
This is the "reproductions are allowed of works of artistic craftsmanship (buildings, sculptures, etc.) that are permanently situated in a public place or in premises open to the public" argument.
2. The owner never put a copyright claim against anyone else making copies of this work. Like the Internet Archive's copy of their website, say (if there is one.) That would suggest this takedown notice is a motivated use of copyright law to attack someone, rather than business-as-usual of them enforcing their IP.
Judges don't like it when you have a history of not caring about people doing something you could have complained about. They take that as evidence you don't care.
3. Fair use! This is a:
• transformative use (it's visible source code, not an executing program!),
• of a small part of their copyrighted work (it's just the Javascript!),
• intended for a purpose that could be said to be both parody (revealing a previously-unnoticed essence of the original work through transformation) and edification (teaching people that the network is doing this thing.)
There's probably even more arguments than these. I hope the poster takes some of them to Github with a counter-takedown to get their repo back up.