I was just looking up the list of lunar probes & orbiters on wikipedia and noticed that, while the USA abruptly ended their probing of the moon in place of (I assume) reallocating resources to the Apollo program, the USSR continued to launch probe after probe at the moon. Why did they not also try and achieve a man walking on the moon, considering how much of a competition the space race was? Did they simply think/know they weren't able to, after so many probe failures? was it political?
The Soviet's failure to reach the moon was partly a reflection of the very same strengths that allowed it to seemingly leap ahead in space exploration in the first place. The Soviet leadership initially did not see much use could be garnered from space exploration and feared that such efforts would distract from the Soviet ICBM program. Sergei Korolev's team had gotten approval from Malenkov for development of an artificial satellite in 1954, but the regime's leadership was hardly enthusiastic about the possibilities offered by space exploration. When Korolev and others involved broached the topic to Khrushchev when the latter toured the R-7 rocket facilities in February 1956, the Soviet premier was not terribly impressed by the potential of using the R-7 ICBM for peaceful purposes. In short, the Soviet leadership primarily saw rockets as mostly as a military weapons. Korolev and other scientists involved in the development of Sputnik had to constantly lobby their superiors by emphasizing the role satellites could play in defense and that the development of satellites would not hinder the development of missiles for the strategic rocket forces. Initial Soviet press reports of Sputnik were relatively blase about the achievement and only when Western alarmism over Sputnik became apparent did the Kremlin realize the potential of space exploration. But although Korolev found himself now awash in funding and other state support, the Soviets still pursued a space program dedicated to achieving quick propaganda victories that could not interfere with the military development of rocketry.
When Korolev did push for a Soviet counterpart to the Apollo program in 1963 along with other ambitious projects like manned missions to Mars and Venus, but ran into a number of obstacles. For one thing, prior Soviet successes in space relied largely upon dual-use technology like the R-7, which was also a first-generation ICBM. The engines and boosters required for manned moon missions would be more sophisticated and greater than what was available and had little immediate utility beyond reaching the moon. The Ministry of Defense, the main source of funding for rocket design, was leery of the of proposed Soviet counterpart to the Saturn rockets, the N 1 rocket as it had little value for defense projects. Korolev found that funding for the N 1 was much harder to come by and the result was the N 1 design process had to adapt shortcuts and other expedients to keep on target. The result was the N 1 was a flawed design. One of the N 1 designers, Vladimir Vakhnichenko later recalled
In discussing the fate of the N 1, it is impossible to be silent about the fact that, in the creation of the launcher, the unwritten law of rocket building was violated: that the bugs in the burn of the rocket stages must be worked out on the test stand. In order to save time and money, it was decided not to construct a stand for the first stage, which meant that the crucial final tests would be shifted to the flight-test stage. The underestimation of the scale factor-the immense size of the launch vehicle, each launch of which was an event in the life of the country-played a fatal role In the erroneousness of this decision. Earlier when smaller launch vehicles and military missiles were being developed, many ground-test "flaws" would be eliminated during flight-testlng. And it was no big deal that for some rockets it was necessary to carry out 40-50 launchings before they "learned" to fly. But that approach was unsuitable for the N 1.
Although Khrushchev saw the propaganda value in the moon, he was increasingly concerned about the Soviet space program's escalating costs. After a visit to one of the Soviet design bureaus, Khrushchev officially sanctioned a circumnavigation of the moon (LK-1) while scrapping the Mars landings and a proposed space plane on 22 May 1964. Despite this cautious approval of a lunar program, the Soviet space program's budget faced increasing cuts. Khrushchev's son Sergei, an engineer in the space program, summed up his father's thoughts thus:
His feeling [on the lunar landing] was uncertain. He wanted to be ahead of the Americans, but for free. So when Kennedy announced the lunar program he did not accept Korolev's pressure that we would have to do the same. And in the end all of them [the chief designers] pressed him and said that it would be much less expensive than the Americans and that we have to do this and [it was] then that he accepted this. So he approved it, but I don't think that he spent too much of his own time thinking about this and discussing it. It was not such a national priority as in the United States
Khrushchev proposed a number of ways out of the increasingly expensive space race, such as a joint US-Soviet lunar mission or statements that the Soviets had no real plans for a manned lunar landing, but the lack of US receptivity to these overtures, which were never concrete to begin with, forced the Soviets to keep to their truncated domestic lunar program.
Khrushchev's fall from power further complicated the Soviet space program. Korolev and manned rockets had been closely linked to the former premier and Korolev had to work hard to be accepted by the new regime. The salaries and perks of engineers in space-related fields, which had risen precipitously after Sputnik, began to level out to other engineering fields during the Brezhnev era. This cost-cutting made its way into the N 1 and lunar programs, leading to their further stagnation in comparison to the Apollo rivals. Brezhnev desired space triumphs like his predecessor, but provided they were done on the cheap and quickly. By the time the Soviet leadership publicly avowed to a Soviet lunar landing in 1967, the Soviet lunar program was in disarray.
Political pressure to have a quick triumph led to the Soyuz 1 disaster in which a faulty design led to the inflight death of Vladimir Komarov in 24 April 1967. This was supposed to be the first orbital transfer of one cosmonaut to another spacecraft, but the multiple problems of the Soyuz craft caused a disaster. Despite this public setback, Brezhnev still demanded that the space program match the Americans without really understanding the technical hurdles involved to reach the moon. In contrast, the US Apollo successes consistently embarrassed the Soviet leadership and led to a degree of low morale within the Soviet space program. The failures of the N 1 led to a retooling of the Soviet space program as it became clear that a lunar landing was unfeasible without a major breakthrough in the N 1 development. meetings within the Soviet leadership gradually came to the conclusion that manned space stations and robotic exploration of space were the best and most feasible counters to Apollo. In October 1969, Brezhnev made a public commitment to space stations as the future of the Soviet manned space program.
Although space stations and robotic probes were more scientifically-focused than the Apollo missions, it is important to note the political rationale behind adapting to this course. Although the official Soviet response to the American lunar landings was to downplay it, this focus upon cheaper and pragmatic space exploration demonstrates how the Soviets were trying to alter the goalposts for the space race.
Source
Siddiqi, Asif A. Challenge to Apollo The Soviet Union and the Space Race, 1945-1974. Washington, D.C.: National Aeronautics and Space Administration, NASA History Div., Office of Policy and Plans, 2000.
A big part of the problem was that they lacked the heavy lift capacity to get men to the moon. It's one thing to send probes that to the moon; it's another thing entirely to send a manned spacecraft to the moon. Sergei Korolev, the mastermind of the Soviet rocket program, had developed the N1 rocket to be used in a heavy-lift capacity, like the Saturn V. However, there was some infighting among the Soviet government, because the N1 held little military value, so they didn't want to pursue it. But Korolev had friends in high places, so to speak, and was able to gain enough support for the program. However, when Khrushchev was overthrown in 1964, the N1 lost a lot of its support in the higher echelons of Soviet government. Then when Korolev died in 1966, his successor didn't have the connections Korolev did to keep the project well-funded.
Those things all contributed to the N1 failing. Of the four N1 launches, all four were catastrophic failures.