In reply to gravy:
Easy, it's called engineering.
If a thread has a 1mm pitch for example as long as the gap between 2 threads is divisible by 1mm the female thread will join the 2 ends together. I have never looked at how a mallion is made but I suspect it starts as a streight bar, cut to length, the nut is put on, the ends are up set (heated and pushed in to increase the diameter), a thread is simultaneously rolled on to each end leaving a bit un rolled as the stop collar then its bent in a jig to the correct shape.