When did this start happening? The last four CTO Macs I've bought -- the last being a 2011 Thunderbolt MBP15 -- were shipped directly from China. The average time from order to delivery was 3 days. The MBP I bought went from China -> FedEx hub in TN -> Fedex World Service center in South Boston -> Charlestown (Boston). That was custom display among several other options.
Dell and HP do the same thing. JIT manufacturing isn't much different than building regular SKUs aside from palleting and binning the different parts required for the order. They don't pre-build carcasses/barebones and ship them to other factories -- that requires much higher CAPEX (for two entire assembly plants, instead of one) and shipping costs (build, inspect, palleting, ship, receive, depallet, inspect, build, inspect, pallet, ship) of the OEM. That's far more complex, introduces much more risk, and introduces much higher costs.
Heck, even for stuff like golf balls. If you order some custom Pro V1s from Titleist, they get built in the same Acushnet Company ball plant in New Bedford, Massachusetts as the regular Pro V1s. They just get binned as different orders when they go to pad printing, and get inspected on a per-order basis rather than on a bulk basis. I know this because I was one of four consultants responsible for building out the back-end applications to support custom orders. And that's for individual boxes of golf balls, not computers costing thousands of dollars. In the case of the golf balls you explicitly pay extra for the custom order. In the case of the computers, the added cost is built into the BTO upgrade option prices.
The likely story on the iMacs is barebones's get pulled off one line and queued into a CTO line for the custom orders. Other lines handle standard retail channel configurations. And just like the golf balls, it's probably the same "first come first serve" basis. CTOs are processed in the order they are received at the plant, as long as the parts are available to build them out.