IBM and other companies used to give their source away along with the "binaries". In 1969, IBM was forced to "unbundle" and had to sell services and products separate from the H/W so smaller companies could compete and sell their products (Sorts, compilers, utilities back in those days). IBM was still allowed to give away the code (source included) as long as it was germane to the operation of the H/W - the OS, the IOS, the Assembler (people weren't expected to write code in machine language). If they had not been forced into the situation, the S/W "give-away" would have continued for a few years longer - who knows. IBM also used to have their System Engineers go to their customer shops and actually write applications for the customer at "no charge". The S/W developers at many small shops who leased (or bought) IBM H/W were IBM SEs. Of course, the price was factored into the cost of the H/W price/rental.
BTW, none of that S/W was ever patented (couldn't back then - at least not as S/W) and much of it was documented and made known (unless it was helpful to the companies competitors - but then it was generally implemented by the company's own programmers).
Keep Up with TechRepublic