I read a biography of Stallman several years ago. The whole free software movement was an attempt to preserve the early hacker culture where everybody freely swapped code. So, Stallman didn’t really “invent” FOSS; he just codified that early hacker ethos.