The Soviet Union under Stalin did massively industrialize. Stalins focus was heavy industry to not only produce thinks like tractors but also arms when necessary. The Soviet government did fear a second invasion like during the Russian civil war. But where they right? Did other countries besides Nazi Germany really plan to invade the Soviet Union? Or was Stalin simple super paranoid (even when it was to some degree understandable (he was still a very terrible person, but yeah))?
They presented themselves as the bastion of the revolution of the workers of the world. Being at war with capitalist countries was their raison d'etre.
Also depopulating Eastern Europe to make it into German living space was one of Hitler's declared aims from the 1920's.
Stalin was certainly paranoid, but they were out to get him and Russia. That's one reason why Stalin survived - he & Hitler were each other's justification.