That's what the Cold War was about, innit? Same reason why the US went to the moon.
It's not entirely untrue and some of the cases where it is are famous but much of the time there were entirely pragmatic considerations and/or consequences of other policy decisions. A few things that come to mind are the many constraints on manufacturing capability and industrial capacity, 'dual use' goals, the size of the country (vs. the quantity of developed infrastructure), etc.
In some ways today’s China is also guilty of the same kind of folly, hence high speed rail network that isn’t economical to operate so ideological justifications are needed. Or ghost cities. Etc.
Market capitalism has other downsides, such as externalized costs skewing economic calculations, but it’s a different conversation altogether.
I see similar things in North Korea and Russia too today where it’s almost like a lot of their efforts are based on a hypothetical checklist labelled “What Modern Nations Look Like”
I think whether or not there’s any truth to my perception, it’s why I find a lot of Soviet stuff to be so fascinating in a science fictiony kind of way.