Phil in SF quoted A City On Mars by Kelly Weinersmith
If a nation wants to convey to the world that they are the strongest and best, they can, of course just announce it at the United Nations. But it won't be convincing. Talk is cheap. Space programs are not. Very few nations can successfully fire a guy around the world at 7.8 kilometers per second, then land him and send him on a goodwill tour. Human spacefaring has little utility for the price, especially compared to things like military or commercial satellites, but what it does do is dramatically demonstrate wealth, organization, and technical competence. Throw in the fact that early space rockets were often literally the same as military rockets, and you have an excellent show of raw power that demands to be taken seriously. You of course never hear a politician say, "we choose to go to the moon, not because it is easy, but because it'll provide short-term geopolitical advantage," but something like that is a pretty solid explanation.
— A City On Mars by Kelly Weinersmith, Zach Weinersmith (Page 480 - 481)