system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How was it possible to build those highly accurate CNC machines we have today?

As the questions in the title says, how could we build those higly accurate CNC machines (or any other manufacturing machine) to that accuracy, assuming you need accurate machines to machine the accurate parts for the accurate machine?

Was it some kind of „make 10 parts, take the best one“ and repeating this and gaining the accuracy through that?

And to take the best part, you need good measuring tools and they needed manufacturing by accurate machines and so on. 

Its like „what was first, the egg or the hen?“
gpt
One of the most important parts of how very high precision machine tools are made is the fact that clever design allows relatively inprecise parts to be assembled into a machine that can make a more accurate part. A pretty good example of this is the micrometer, which uses a screw to measure parts with a significant level of precision. Screws are easy to make on even a relatively crude lathe, and micrometers can be used to check the accuracy of parts that will be made into a more precise machine. Another important part of making good machine tools is being able to make perfectly flat surfaces that can be used as beds, machine ways and reference planes. In theory it's possible to rub or scrape any three non-flat surfaces together in a specific order and eventually they will reach whatever level of flatness that is needed for their intended application, without any fancy tools or precision equipment required.