There's always a lead time. But the pace at which prefabricated items can be built in a factory is significantly greater than that at which items can be site built. The constraints on an urban site are a significant logistical problem - site fabrication requires lots of different trades arriving through city traffic at the same time because there isn't much space in which materials may be staged. Every trade adds to the traffic through which other trades must transport their materials.
Conversely, prefabricated units can be built virtually anywhere and shipped economically over long distances...i.e. fabrication can occur at a factory in a rural location and assemblies can be moved by rail or barge.
I worked on a Low Income Housing Tax Credit project where the developer had granite countertops and solid wood cabinets shipped from China for roughly the same cost as standard economy cabinets and commodity laminate countertops.
What made it practical was the specifics of LIHTC funding. A significant amount of the funds had to be spent upfront on materials and/or labor or it would have been lost. This made the long lead time beneficial because early stages of construction such as clearing and grubbing are relatively inexpensive whereas finishes are relatively expensive.
Conversely, prefabricated units can be built virtually anywhere and shipped economically over long distances...i.e. fabrication can occur at a factory in a rural location and assemblies can be moved by rail or barge.