Having been in the DoD procurement racket for several years, I will pass on an observation.
These major weapons systems, mainly planes, have a gestation that makes reliability extremely challenging.
Not only are the planes conceived and ordered with the "latest" technology, but while the first units are being constructed, even newer technology is being developed around the country and around the world. So AS THEY ARE BUILDING the first planes, the government and the contractor are considering and incorporating new, innovative features that were not part of the initial design. In each case, you have the Contractor(s) or some vendor whispering in the Generals' ears that this plane will be "obsolete when it comes out of the starting blocks" if it doesn't have this latest gadget. And when the generals hear that, it becomes a "must have."
And adding something to a plane or a ship is not a simple matter. They are designed with NO SPARE SPACE, and they are perfectly balanced, side to side and front to back. Every cubic inch of that plane is occupied with some essential part, and when you say, "Here is something else that has to fit," it often involves multiple ripple effects, because the plane will still have to be perfectly balanced on every axis.
It is not unusual to have scores to new add-ons incorporated into the design of a plane WHILE IT IS BEING BUILT.
While all this does not excuse unreliability on a plane that costs tens of millions of dollars, it is the main reason why the unreliability exists. If "we" were buying Piper Cubs, they would last forever and require minimal maintenance. But that's not the case.