Early on in the Apollo program there was the plan to build a series of spacecrafts which would progressively solve intermediate problems on the path to the Moon landing. For that, a series of Apollo spacecrafts were planned, and production was running for years - Apollos flew also to Skylab and to 1975 docking with Soyuz.
Specific Apollo 8 was chosen to fly to the Moon because LEM wasn't ready - it was later tested on Earth orbit with Apollo 9 and flew to the Moon with Apollo 10 first time. So, Apollo 8 flying to the Moon isn't a separate decision, but change of existing plans - with a couple of missions swapped in time; fast, but not nearly as fast as creation from scratch of a spaceship or a program would assume.