And why had we been developing the engines in the first place?
The "We Choose to Go to the Moon" speech was given, if I recall correctly, in September of 1962. This almost a year and a half after Alan Shepherd went into space on Mercury-Redstone 3, and some four years after the Mercury program had been conceived under President Eisenhower. The purpose was to rally people around a goal that had already consumed almost 2 billion dollars and would consume well over a hundred billion dollars (in today's terms). But why was this important, and important to do fast?
Because putting a man on the moon would be the biggest, most decisive victory in a propaganda war that had been raging for nearly a hundred years.
If you read what people were saying from a hundred years ago, it's clear that many people thought capitalism was doomed. It's hard for people under 50 to believe, but "socialism" was a word associated with futuristic stuff, and progress. These attitudes toward the future of capitalism persisted into the Cold War and were a major thorn in the side of US foreign policy. When India adopted its constitution in 1950 that constituion declared India to be a socialist nation. Socialism played a major part in the foundation of the State of Israel, an Israel's first president David Ben-Gurion was a "Labor Zionist". And across the middle-east, the force radicalizing young Arabs wasn't fundamentalist Islam, it was Baathism -- "Arab Socialism". Across the world, capitalism was seen as an antiquated system imposed by colonial powers to keep people backward and subjugated.
Then on July 21, 1969, the leading capitalist (albeit welfare state) nation in the world put a man on the Moon. It put a stake through the heart of notion that capitalism is an antiquated, reactionary system. That's probably a hundred billion dollars well spent, considering what was at stake.
Looked at one way the goal itself did nothing practical for us, it was all the things we had to learn to be able to achieve it. But it is still amazing to me that nearly fifty years later people around the world see Neil Armstrong taking that last step as a kind of milestone in human progress.