My early rememberences of shared code are from articles in Communications of the ACM, Knuth, Numerical Recipes in C and the sample code distributed by manufactureres of specialized chips such as DSP's. Granted, much of the earliest was in pseudo code of one type or another.
The thought that there might be some advantage to having someone other that the original programmer read the code to catch errors was suggestive of open source but I don't recall that idea being all that popular with the original programmer at the time.
One of the problems with reading the code of another programmer was that the code, by and large, tended to be unreadable. "Spaghetti" code resulting from liberal use of "goto's" too often was the rule until Dijkstra's "Go to Statement Considered Harmful" letter to the Communications and the structured programming movement brought some hope of there being any value to the source being open.
The view often was that hardware made money while software cost money. This changed only when the hardware dropped in price due to integrated circuits and the hardware manufacturers allowed one company to control the operating system. So, you might reasonably say that the integrated circuit led to open source software. Nothing has yet done for software development what the integrated circuit did for hardware.