Plus it lets people decrypt media encrypted by that key that they might otherwise have been unable to.
So we've established that a "private key" that is no longer private may still have uses to some people, it is not wholly "worthless."
Do you want to revise your earlier statement about the private key in the repo in question? Is it "worthless"? Is it a security problem? Do you know what that key is being used for?
Public-private key pairs only work if the private key is secret. If it’s not secret it doesn’t work.
This is a simple fact of how cryptography works. Or passwords, keys, or any secret like an API key, etc…
If you publish such things on GitHub, they instantly become “not what you’ve labelled it as”.