Compare the amount of effort that goes into both design and production of a physical part and a line of code.
A single physical part generally has many, many inputs and outputs (expressed as its physical contact surfaces, tolerances, forces and stresses of all possible kinds from all directions they are supposed to withstand, etc., all with the added dimension of time) compared to a line of code or even a function. You cannot design a 'functionally pure' part, or design a part that creates itself for every discrete 'use'. And unlike a line of code, it can't be quickly replaced so you must get it right. And if you get it wrong, people may die in this particular example. Etc.
And that's before we become concerned with actual production of that part, whereas all you need for to write a line of code is a text editor or pen and paper.