Fabrication process is quite complicated, the cost isn't about the material, but about the technology involved and all.
Nanotech chip fabrication process requires:
-Silicon wafers(usually in mass production)
-Etching (wet etching is cheap but the cut is rough, dry etch is sharp but hella expensive)
-lithography (micro size are cheap like pennies using visible light, but nm stuff will need x-ray or electron beam which are hella expensive)
There are also stuff revolving around structural support and design, which cost a lot research wise.
Each machine in fabrication is on the order of millions USD or more
The fabrication lab are also expensive to maintain.
Basically, the material, like silicon and even gold you need in the process will not reach 20 dollars, but the refinement and deposition of silicon and etc cost a lot.
You are paying for the technology.