With more traditionally run series, you are correct about intended air order and production codes. But with this one, since air dates were not imminent, scripts were assigned to be written (and numbered) once the writers were finally able to get to them.
The idea for the episode had already been approved. It was just…