It is said that the U.S.S.R. briefly enjoyed a military parity against the US of A in 1971 - for a golden moment of perhaps 2 weeks.
In order to do this, the Soviet leadership doubled military spending over the course of the 1960s - spending up to perhaps 40% of their GDP, and basically skeletonizing their domestic economy and bankrupting the country. Despite Republican propaganda to the contrary, it was not Ronald Reagan who won the Cold War so much as the Soviets who lost it. (And even then, and to this very day, the cold war "victory" of the United States involved American cities still being targeted by 5,000 or so ex-Soviet nuclear warheads. Some "victory").
Why would any sane leadership do this? No really? Why?
Well, the standard answer is that they were reacting to military expenditures on the part of the the US and NATO. That, and the fact that, being the quasi-religious zealots that they were, they were attempting to export the revolution to the world required that they make sacrifices.
I'm sorry, that doesn't wash. Especially since the Soviet records and interviews are freely available after the downfall, of what the Soviet leadership's motivation and justifications were.
So, there was a mindset similar to that of Israel which was: Never Again. The Soviets lost 26 million people in World War II. Let me spell that out for you to let that number sink in. Twenty-six million people dead. That is a wounding that lays heavily upon a nation's consciousness and character. We citizens of the United States, having never suffered a serious invasion or loss of life, EVER, cannot even comprehend what it does to the national psyche.
So, there's that. Couple that with a game of technological catch-up against their Western rivals, a lack of incentive - aside from a dubiously inconsistent patriotism - on the part of their citizens, a seriously underfunded and underdeveloped infrastructure spread across the largest nation on Earth, and you have a fairly large incentive to invest in areas that do not provide for, or enrich, your own people.
But the biggest reason by far, bar none, (in retrospect, based upon solid empirical evidence) was the firm conviction that the United States of America would inevitably attack the Soviet Union with a nuclear first strike.
"Impossible!" you might cry. "We Americans are a peace loving people! We would never launch a first strike against the Soviets! That would be insane!"
Well, who said we were sane? If you take a step back and look at Americans as if they were an alien culture, if you look dispassionately at our culture and history, you have to admit that we are a not a nice people. We have engaged in genocide, enslaved whole nations, attacked our neighbors, taken what we want. We have lied, cheated, stolen. Our leaders and followers, both brilliant and brutish, and consistently been ruthless, remorseless. We are a juggernaut that built up a continental empire, and then moved onwards to world domination. We are quick to take offense, slow to forgive. Pathologically insane. Psychotic. Murderously, diabolically, inexorably atavistic and grasping. A nation that will go ape-shit insane at the slightest provocation, either real or imagined.
The Russians looked at us and said "They are exactly like us. They are brutes. Beasts. Our kind of people. They would do exactly what we would do if we could. In fact, why have they not done it? Obviously they will attack us".
Need I say more?