The audio version of the story mentions that it was a decision by the patent office, not specific legislation. Sometime in the 1980s they went from copyrighting software (i.e., treating it like literature or art) to patenting it.
No, the audio version mentions that the patent office used to operate on the principle that software could be copyrighted but not patented, but sometime in the 80s the judiciary indicated in several instances that was not the case and the patent office complied.