Why Is Linux Free?
To answer this question, it is necessary to understand the history of the creation of this operating system.

First, UNIX
The Unix operating system was conceived and implemented in 1969 by AT&T Bell Laboratories in the United States by Ken Thompson, Dennis Ritchie, Douglas McIlroy, and Joe Ossanna.

Released for the first time in 1971, Unix was written entirely in assembly language, a common practice at the time.
Later, these guys realized it was unfeasible to write something so comprehensive in Assembly. So they decided to write a high-level language. They called it Language B, from Bell Labs.
This language evolved and was later called Language C, simply because it came after B.
Later, in 1973, the system was rewritten in the C programming language by Dennis Ritchie.
The availability of a Unix implementation made in a high-level language made its portability to different computer platforms easier. At the time, most programs were written on punched cards that had to be batch-fed into mainframe computers.

Due to an antitrust law that prohibited it from entering the computer business, AT&T was required to license the source code of the operating system to anyone who wanted it.
As a result, Unix grew rapidly and became widely adopted by academic institutions and various companies. In 1984, AT&T divested Bell Labs; free from the legal requirement demanding royalty licensing, Bell Labs began selling Unix as proprietary software, called Unix System V.
Richard Stallman decides to write an operating system

The GNU Project, started in 1983 by Richard Stallman, had the goal of creating a "completely Unix-compatible software system," composed entirely of free software. He called this system GNU - GNU is Not Unix - a recursive acronym.

Later, in 1985, Stallman founded the Free Software Foundation and wrote the GNU General Public License (GNU GPL) in 1989. In the early 1990s, many of the programs needed in an operating system (such as libraries, compilers, text editors, a Unix shell, and a windowing system) were completed, although low-level elements such as device drivers, daemons, and the kernel were stalled and not completed.
Minix, the Unix for teaching operating systems
In 1987, Professor Andrew S. Tanenbaum created a UNIX-compatible operating system ported for PCs.

His goal was to use this system created in C Language and Assembly to explain the principles in his textbook, "Operating Systems Design and Implementation" from (1987).
An abbreviated version of the 12,000 lines of code of the MINIX 1.0 Kernel, memory manager, and file system are in the book. Prentice-Hall also released MINIX source code on floppy disks with a reference manual. MINIX 1 had a system call compatible with Seventh Edition UNIX.
Minix became popular in the academic computing community, as most students wanted to run the Unix they used at University, but due to hardware prices and software licenses, it was prohibitive.
Linus Torvalds decides to make his own Unix-compatible system

Linus Torvalds, a computer science student at the University of Helsinki, began development of his Unix-compatible system kernel as a personal project, inspired by his interest in Minix.
He limited himself to creating, in his own words, "a better Minix than Minix". And after some time working on the project, alone, he sent the following message to the comp.os.minix usenet discussion list:

Hello everybody out there using minix
I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu) for 386(486) AT clones. I've been working on it since April, and it's starting to get ready. I'd like any feedback on things people like/dislike in minix, as my OS resembles it (same physical layout of the file system (due to practical reasons) among other things).
I've already ported bash(1.08) and gcc(1.40), and things seem to work.
This implies that I'll get something practical within a few months, and I'd like to know what features most people want. Any suggestions are welcome, but I won't promise I'll implement them :-)
PS. Yes - it's free of any minix code, and has a multi-threaded file system. It is NOT portable (uses the 386 task switching etc), and it probably never will support anything other than AT hard disks, as that is all I have :-(
Free translation of the email
On October 5, 1991, Linus Torvalds announced the first "official" version of the Linux kernel, version 0.02.
Almost Linux was never created
If GNU had been released before 1991, Linus Torvalds would probably not have created Linux and would have used 386BSD.
Anyway, the people from the free software movement left their contribution, because in 1992, impacted by the GNU and Free Software movement, Linus Torvalds changed the Linux kernel license, from a proprietary license to a free license compatible with the GPL of the GNU project.
Since then, many programmers have contributed to the development, helping to make Linux the enormously successful collaborative kernel it is today.
Linux is a success because it is collaborative
In the beginning, it was used by programmers or only by those who had knowledge and used command lines. Today that has changed and there are several groups that create graphical environments for the various GNU/Linux distributions, which are increasingly user-friendly, so that a person with little knowledge can use Linux, through a GNU/Linux distribution, for example.
Today Linux is a stable kernel and can recognize many peripherals without the need for the user to install drivers for sound, video, modem, network, among others.
Curiously, the name Linux was created by Ari Lemmke, administrator of the ftp.funet.fi site who gave this name to the FTP directory where the Linux kernel was initially available. Linus had initially named it "Freax".
That was just one piece. The course teaches the whole path — from your first command to exam day.