Here's one example. Today's median American soldier's primary weapon is the M4 carbine (https://en.wikipedia.org/wiki/M4_carbine), which by all accounts is a solid piece of kit that has acquitted itself well in Iraq and Afghanistan.
But the M4 is the end of a long line of revisions made to an older weapon, the M16 rifle (https://en.wikipedia.org/wiki/M16_rifle), which first rolled out during the Vietnam War. And the first version of the M16 was so bad it got a lot of soldiers killed.
See, rifles have a lot of moving parts, which typically means they have to be well-maintained -- periodically stripped down into parts, and then all the parts individually cleaned and lubed -- or else they start to malfunction. Maintaining their weapon was a standard part of a soldier's job; not something anyone enjoyed doing, but something they did because they didn't want their rifle to fail on them in combat.
But Colt, the makers of the M16, advertised it as a revolution in small arms -- a "self-cleaning" rifle that used Space Age materials to remove the need for all that fussy work. And so, when the Defense Department rolled out the M16 to the troops in Vietnam, it didn't bother to issue any of the usual cleaning tools along with them.
Which meant that a lot of soldiers found themselves in an awkward spot when it turned out that Colt's testing processes for the "self-cleaning" M16 hadn't really accounted for the rough jungle conditions of Vietnam. M16s started jamming all over, frequently so seriously that the entire weapon was rendered useless; and even if the soldiers carrying them had wanted to start cleaning them to try and prevent those jams, they lacked the tools they'd need to do so. So soldiers started getting killed, shot down in battle while frantically struggling to un-jam their bricked rifles.
The situation got so bad that it prompted a Congressional investigation, which found a host of reliability problems with the M16. Colt went back to work and created a revised version, the M16A1, which mostly resolved those issues. The M16A1, notably, was not advertised as self-cleaning. And when it finally rolled out, it came not only with a set of cleaning tools, but with a comic book-style manual by the famous comic artist Will Eisner explaining exactly how to use them (which you can read here: http://www.astrotx.com/M-16A1%20Rifle.pdf).
And then there were even more revisions developed; the M16 remained the Army's standard rifle through the early 2000s. And then it was replaced by the M4, which was just a shorter, lighter, even more further developed M16. So eventually the government was able to throw enough money at a terrible weapon to turn it into a decent one.
It's a shame so many grunts had to die along the way, of course. But hey, Colt got paid twice! You know?