Because mechanisms instantiated are by their very nature "published," and any repairs are documented because they require intervention by the mechanic... or could be documented by anyone with enough knowledge and training to examine the mechanism.
Patents and other intellectual property methods are the only barrier to a competitor reproducing the mechanical product, but software allows additional barriers to reproduction as well as a means to prevent modification of the operation from the manufacturer's desired behaviors.
I'd also note that the era in which those mechanisms were created and documented included an expectation that owners often did their own automotive maintenance and repair and were far more mechanically-minded (it was an age defined by mechanisms) than current owners of autos.
While the hardware it runs on may require servicing, well-designed and well-implemented code should indeed be free of such a need.
Alas my experience in maintaining many codebases over the years suggest that most code needs a lot more servicing, itself, than the hardware it ran on. ;)
Patents and other intellectual property methods are the only barrier to a competitor reproducing the mechanical product, but software allows additional barriers to reproduction as well as a means to prevent modification of the operation from the manufacturer's desired behaviors.
I'd also note that the era in which those mechanisms were created and documented included an expectation that owners often did their own automotive maintenance and repair and were far more mechanically-minded (it was an age defined by mechanisms) than current owners of autos.