""Why would programmers ... keep how it works a secret?"
"Why would programmers spend much time to come up with a great product and then keep how it works a secret?"
They wouldn't, deliberately. However, they would through benign neglect.
Remember, they're programmers; they're not technical writers. Some programmers won't include even the slimmest of internal comments in their programs without a gun to their heads. The best will provide profuse documentation, both internal and external, but even they aren't going to enjoy doing it.
Writing documentation isn't programming; it's more like homework. If programmers enjoyed doing that, they would have been English majors instead. Few enjoy it, and if they aren't getting paid to do so then some of them will let it slide.
"Comments? Why? The code speaks for itself!"