There is a variety of software licenses which provide access to the source code. Here are a few.

Open Source, The organization, and an Informal description of such a license

The Mozilla organization provides an annotated version of the license under which the Netscape browser software was released. The E language license is similar.

GNU is headquartered here. Their license seems to keep all derivative works from ever becoming proprietary. This is mainly a religious thing although there are thoughtful arguments on both sides. Here is a variety of licenses encouraged by GNU. This is the world where “copyleft” arose.