I think the Thunderbolt 2 spec was simply not available at the time the latest iMacs came out
Maybe not so much the specs, but Intel were saying that the chips wouldn't be available in production quantities until 2014.
So what you're saying is Apple managed to develop, test and manufacture an updated MacBook Pro somewhere in between the month the iMac was released and Thunderbolt 2 suddenly became available. Of course they did.
Yeah. It was an evil plan to cruelly force planned obsolescence onto iMac buyers by omitting a feature that nobody was expecting anyway... replaced just a month later by an evil plan to cruelly force future-proof TB2 on rMBP buyers when the feature hadn't been expected for another 6 months. Hmm.
I don't happen to have any inside knowledge of Apple's development process, but I think that we can be pretty sure that
both design processes started and the specs were frozen
months before the machines were released. There are 101 possible reasons why it might have been practical or desirable to add TB2 to one but not the other. Maybe the iMac was an older design who's launch was delayed by a tech problem, component shortage or a surplus stock of older models. Maybe the rMBP team had to go back to the drawing board to fix a gremlin, and took the opportunity to add TB2 support at the last minute. Maybe the early TB2 chips had a glitch that affects the iMac but not the rMBP.
Or maybe Apple got a limited supply of TB2 chips at the last minute (they weren't expected until 2014, remember) and had to prioritise which machine would get them first.
Who knows? Apple don't discuss this sort of thing.
It was slightly odd that the iMac got released before the rMBP - which would be consistent with the rMBP being held back so it could get TB2.