The reason this happens is "regulations". They don't want just a hammer. Somebody specifies that the hammer has to have all these characteristics, none of which have ever been measured, and the hammer is an inch longer than normal and the head is quarter inch off. So, a company has to run tests on special hammers to show they qualify, and there are a lot of tests to be run. If the military would just say they wanted a thousand hammers of normal type, they wouldn't cost much at all.
At times, some nefarious types who are told to write the specs will write them so narrowly than only the hammers made by Cousin Joe match the specs.
Or Billy Bob pays him to write them to favor their hammer designs.
This happens with large companies also.
This is a lot of it, yes.
The other part of it is product lifetime. I've worked with defense contractors both on computing projects at a previous job, and storage devices earlier in my career at my current job.
There's a huge push in the industry towards COTS (commercial off-the-shelf) products. The military WANTS to buy things much more normally. But they basically can't.
The military does nothing quickly. And once they do something, they absolutely HATE to change it.
Now, the computer and data storage industries move VERY quickly. It's a constant churn to make products faster and more cost effective, and we're all running 1000 miles an hour just to not fall behind.
Well, that doesn't work well. Because by the time something has been bid out to defense contractors, they've gone to their suppliers, everyone has gotten their designs in order and submitted back to the military, then the military actually awards the bid to one (or multiple) defense contractors,
years have gone by. Which means that whatever computing/storage products were chosen--usually the best available at the time--are now obsolete.
Which means that to continue building something long after nobody else in the world wants it, requires very specialized planning in the supply chain and thus it falls into the "too hard" pile for any company that isn't specializing in supplying long-life industries. And those who specialize in supplying long-life industries understand that what they're doing isn't free.
Add in the fact that everything has to be ruggedized, some things need special coatings for environmental/corrosive, and you get product requirements that are never quite EXACTLY spelled out but essentially mean "can it handle an EMP burst?", and you realize that COTS just doesn't cut it.