Visicalc and Lotus123 are interesting examples. Visicalc was developed by a college professor. After developing the code, he went to a patent attorney and asked to get a patent on the software. The attorney correctly informed him that software could not be patented. The professor then release the spreadsheet software unprotected. That allowed Lotus and eventually Microsoft and others to issue their own version of spreadsheet software without paying royalties.
What the original patent lawyer failed to inform the professor is that while software can not be patented, it CAN be copywrited. That was a very expensive oversight for the professor.
The professor originally came up with the idea based on stories from students returning from co-ops with a particular company. That company had a long room with blackboards all down the wall. The co-ops were charged with collecting financial information about the company and entering the info into squares on the blackboards. Each square included calculations or directions with what to do the information.