The point is going to the Moon was always about flexing on Soviets and testing out spatial capabilities. The Space Race was used to deplete Soviet morale AND their economy. The US knew that the USSR initially had the upper hand scientifically (first satellite, living being in space, first man in space, etc) but didn't have the financial means to hold up long term. So the Moon was a symbolic objective and a strategic one to force the USSR into spending money they didn't have. As it appeared clear that the USSR was indeed starting to crumble, the whole space race became less relevant, even more so when it appeared that there not much to actually be discovered on the Moon. I mean the US has been there like 7 or 8 times and there have been countless robots sent too, from various countries, how many times do you have to go to realize it might not be worth the hassle.