Because you won't know that a protocol isn't being followed. Your contracts, insurance, and criminal code won't cause you to realize that an employee caused an infosec incident if they don't tell you (and neither will your math and cryptography). And the more you threaten use of the criminal code, the less likely people are to admit that they made a mistake.
You can either build defense in depth (e.g., regular secret rotation, policies on use of GitHub in the first place or better yet automation that only pushes publicly after internal review, DLP via a corporate MITM, segregating your open source dev from your secret dev, etc.) or you can let your single defense get breached and have no idea.
Contracts, insurance and criminal code are responsive measures, not preventative measures. Security is preventative, not responsive.
Which feature are you meaning should be optional and more known?
Not sure how practical that is to implement for every technology, but for many it could probably be done.
Seems like a time+money vs risk trade off thing.
99% coverage is not good enough from a security standpoint, not when we can achieve 100%.
Simply, this functionality should be transparent and toggleable.
But at the end of the day, any secret you post publicly is compromised.
GitHub had great search, then they took it down when they found people we're scraping credentials with it, then they had bad search. I'm connecting the dots.
We have to try and mitigate damage from lapses in communication and protocol like that.