I interned at Micron as an industrial engineer looking at capacity and equipment purchases. I can very much relate to that. The whole summer was my mind being blown by the orders of magnitude across the board and it's somehow it's an economically viable process.
First, we take this giant silicon crystal taller than humans and cut it into wafers. Then we take these pure materials (like 99.99999% pure) and transfer a tiny big on to the wafers in a successive layering process. Oh no, the deposition process wasn't perfectly even across the whole wafer (because of annoying laws of physics), so we'll throw it into the chemical mechanical planarizarion process to skim off a tiny layer keep the internal mechanical stressed down. Add in other mechanical, etching, lithography, and measurement processes and it gets crazy.
Wafers go through hundreds of manufacturing steps depending entirely on purpose, and with each step there's a possibility of messing up part or all of the wafer.
99% yield on a per-machine basis is sub-par in most manufacturing environments, but achieving that would be devastating in semiconductors. For sake of demonstration:
0.99^100{manufacturing steps} = 36.6% total process yield.
0.995^200 = 36.6% total process yield.
0.9975^400 = 36.7% total process yield.
Each additional 9 on yield is really expensive to add.
In school we talked about 1/1000th of an inch being kinda tight to hold on a CNC mill, with 1/10,000th needing a lot more specialized processing and time. Suddenly I was hearing about nanometer thick layers with tolerances measured in angstroms.
And the capital expenditure was nuts! 6-figures hardly gets you anything in a fab, it's really in the 7-8 figure range where you see most of your equipment landing. That will be old but still viable equipment in a few years.
Somehow depreciating all that equipment designed to make chips sold at pennies to dollars each is profitable.
As far as I'm concerned, it's black magic and truly an incredible achievement for humanity.