Even the traditional style most of the studs are pre-cut to length. And much of a modern factory happens on the job side - they just move the tools the site each time. Of course houses are not built identical and so there are differences - but the variations are things that are not hard for the factory to deal with.