It's the other way around, all communist states were pretty much military states as it suits best the command style economy (How else would you make it work anyways?).
Then starting from that, what the military does best is producing weapons.
Then starting from that, what the military does best is producing weapons.
That's the only country which wasn't at war which was proportionally spending that much on the military.
The Soviet Union was a military state disguised as a country, pretty much nothing outside the military really mattered there.
It's even visible on the inside organisation of the Soviet Union itself (which they picked themselves, nobody asked them), which is pretty much the same as in any army, just at a country level.
Sure, the US exploited that flaw but it's been there by design.