A: the refresh was seriously delayed, 19 months is ridiculous. B: Apple has many manufacturing partners, other companies have hundreds of different lines being produced all at once. I know it may seem magical to you but Apple's partners could have continued building the old chasis with refreshed components and started winding down once the new iMac was ready to go. This was sloppy, plain and simple.
It was said one reason Apple pulled out of MacWorld Expo was the expectation of a new product or major upgrade to accompany every keynote. The anticipation was nice for the rest of us, but it had to be hell for Apple.
I upgrade my Macs (Pro, iMac, Mini, Air, MacBook) about every five years on a rotating basis. I start with the most powerful example I can afford, and Apple's design and engineering carries it the rest of the way. Seldom does software or an accessory appear in the marketplace that one of them cannot handle. They get a ridiculous amount of work in my shop. I see nothing sloppy about taking 19 months to re-design an entire new chassis, re-tool an assembly line, implement new testing, procedures and training, work through the start-up punchlist and begin production of the precision instruments we are using.
On an ending note, in Apple's long history they haven't "wound down" many products. Radical refreshes and abrupt dismissals, yes.