A Regulator goes through many manufacturing processes before it is ready to be shipped to a dealer. First stages are machined from brass or titanium rods, then cleaned before being coated with various metals to protect the the body from corrosion and then all the components are assembled and tested.
The second stage goes through a similar process including the molding and extruding of plastic components like the housing and front cover. When everything has been assembled each regulator is tested in a machine to ensure it meets the strict performance criteria set by both the manufacturers and testing bodies as well as the expectations of every diver.
This video shows you many of the stages a regulator will go through whilst being made.