Technological improvement that happens because of military spending could have happened anyway under civilian spending, although the side effects resulting from research may well be different.
On the other hand, neither Germany or Japan in WWII had to suffer through the terms and conditions placed on Germany after The Great War (WWI). That was if anything, the worse possible way to help a country recover.
But it seems like a criminal waste of resources to build the developed stuff -- and train lots of people. This decision have no good reason (North Korea? Hardly), it is forced because China haven't democratized so it needs external enemies to generate jingoism and hinder criticism of the Party.
(But sure, maybe China's main motivation is to get natural resources in sea areas that have belonged to other countries for centuries. That is hardly better.)
Edit: Clarity.