Linking to another post in a different thread but which I think gives a good background to "why the Moon" as well as why the US was behind:
The U.S. Cancels cruise missile development instead of ICBM development
https://www.alternatehistory.com/forum/threads/the-u-s-cancels-cruise-missile-development-instead-of-icbm-development.395592/page-2#post-12991471
Archibald wrote:
I'm thinking about the wanky scenario where the Soviet Union a) manage to shoot a Zond into lunar flyby before Apollo 8 and b) Luna 15 beats Apollo 11 to the surface to bring back samples. At the end of the day I don't think much change: what mattered (to worldwide public opinion) most was LAND MEN ON THE LUNAR SURFACE and there the Soviets were years behind (1973 if all went well) Man around the Moon ? Done by Apollo 8 and not the final goal. Robotic sample return ? Really ? Who cares about robots ?
People "care" a lot more about robots than many think

Sputnik was a 'robot' after all and the 'man-in-the-street' still shows an up-tick in interest any time a probe reports some news. Keep in mind that the Soviets had already 'prepped' the 'man-versus-robot' argument with media reports of their planning on using robots instead of men because it was more 'prudent' and safer than going straight to humans and a Zond shot doesn't actually take away from that stance. As far as the world public in general would see it they would not distinguish between a 'fly-by' and what Apollo 8 does any more than they would initially find a major 'difference' between a man-in-space if Sheppard had gone suborbital before Gagarin went orbital.
Eventually there would be a clearer separation in the public mind but initially it would be the simple fact that the Russians beat the Americans "again" which would be the main point of discussion. America would 'win' by landing a bit later on and while the Soviets could maybe get samples back before Apollo it wouldn't be much of a coup whereas going 'around-the-Moon' certainly would.
The "big" deal would be in the US where it would be the perception that despite spending huge amounts of money and resources, (and killing three astronauts which was still a sore issue between Congress and NASA) the Russians STILL beat us around the Moon. There is a window of 'opportunity' here for the Russians because while NASA is 'on-course' to land keep in mind that the LM wasn't ready yet and had yet to fly. Congress IS going to take note of this and all the delays and it's quite possible the could call another halt to the Space Program while a Congressional review is held on the matter.
Not probably mind you as NASA will be lobbying hard to keep things going and while outgoing LBJ will probably make a fight of it and incoming Nixon admires the space program and astronauts greatly there will be the obvious question of will his new administration have to take another slap in the face if the Soviets have ANOTHER trick up their sleeves? Public opinion, which is turning against the government and presently more ambivalent than excited at best towards Apollo is going to take a down-turn and that could easily start feedback with Congressional feelings in looking for scapegoats.
Get enough sentiment stirred up about the situation and start tossing enough blame around and I can possibly see a delay in continuing the program and the Russians might have an opportunity to make the inevitable US landing less relevant than it was OTL and less clear of a "victory" for the US.
I highly doubt they could pull off a landing and return before the US no matter what but if they did...
Fasquadron wrote:
I'm not sure it would be unimportant...
For one thing, a circumlunar mission and a sample return mission before Apollos 8 and 11 respectively could pep up political support for the program in the USSR. That could mean more support for getting men onto the moon or it could translate into more Luna missions (maybe even launching a mission with men in orbit around the moon controlling robot explorers on the surface) as a cheap way for the USSR to say "yes, you got men on the moon, but that was a silly stunt, look at how we do so much useful science with our robots and can afford to keep sending them". More resources being devoted to the Luna program could be quite interesting.
As noted it would have effects in the US as well and also as noted I suspect it wouldn't cause the US to re-affirm the idea of beating the Russians given the public/governmental mood at the time, though I'd hope to be wrong

One thing I've always wondered is if one side or the other simply made the choice that it didn't matter who got there first but who 'stayed' in the end. Of course then again I like to play the "Pilgrim Project" scenario over in my mind... Getting that to come together as an actual TL? Eh, not so much
For another thing, a closer moon race might make both sides see other elements of the space race differently. It may add to the sense that the Soviets are winning the race to build capability during the 80s (when Salyut and Mir had some commentators worried).
I'd like to think that but under the circumstances my gut tells me that the US would be more likely to 'give up' in a similar manner to OTL USSR and concentrate on lesser capability while looking like they are building up capability to save face. The problem was the US was basing so much on outdistancing the by going for the Moon landing and it seemed pretty clear that we'd gotten out ahead by Apollo 8. But if you have the Soviets "beat" us again at something that seems so close the whole US psyche is going to take a hit. And in fact that was something that was feared and why the announcement of Apollo 8 was delayed to give the Russian's as little warning as possible for fear they would do exactly this.
Spin control was in place and prepped in case the Soviet's DID manage to pull a fast one but I have doubts as to how effective it would have been under the circumstances.
Randy