I believe this is one mistake a some people make when looking at code on Github. Sure the code is posted on Github, but it doesn't mean it's posted under a license that allows you to use that code in any way. Github is a source code repository, not an open source code repository.
Confidential notices on open-sourced code are funny, but what's wrong with "all rights reserved"? From my understanding, that just means the owners are choosing to not place an open license on the code and reserve all of their rights. By open sourcing it, I'm sure they recognize it will be difficult to enforce those rights, but that's a different matter.
I only searched for "all rights reserved" because it yielded more code with an actual license in it and not just the text "confidential". I'm sure you could refine the search even further.