One of the core responsibilities of the state is to protect itself. Not sure how you don't have this planned apart from anarchy ¯\_(ツ)_/¯
At least that's how it was done back in the "golden years", post WW2, during which inequality was quite stable etc
Imagine if the government said no food stamps, we'll just run our own grocery stores to provide for the less fortunate and we'll hire the best people.
You see the difference? Do you really think government run corporations would be able to design better military defense systems?
(Though I was thinking more of the research/planning vs actually mass production, that you're taking about. Especially as this discussion is about such as case too, considering it's software)