The young president Kennedy was getting beat by the Russians. The Bay of Pigs had been a fiasco, as had a summit with Soviet leader Nikita Kruschev in Vienna. And now, the Soviet Union was clearly ahead in space. Kennedy committed the U.S. to getting a man on the moon. It’s probably that commitment, and his subsequent tragic death, that made it possible for the goal to be accomplished.
Link to Part 1.