Proprietary doesn't mean secret. There are codebases that are made available to customers for inspection, under NDAs and with all copyrights "reserved" by the owner. Looking at code is not the primary benefit of open or free software.
Mind you, usually, the folks who offer to show you the code under NDAs are not nice guys.