Would you agree to explain more about why it often wasn't the case? Or give exemples?
The Potsdam Giants were a Prussian regiment with an average height of 6'2" serving a 5'3" king who was on the record as saying that he was horny for tall soldiers. Geopolitics bent around Prussia favouring the countries that supplied him tall recruits for his pet regiment.
Steam rams were the dominant naval doctrine in Europe for thirty years. An entire generation of ships were built with the ram as the primary armament with guns existing only to make it so that the ram could reach the enemy ship. No steam ram ever successfully sunk an enemy ship. Plenty accidentally sunk friendly ships, though.
Marcus Licinius Crassus was the richest man in Roman history and may have been the richest person in all history. He's said to have invented fire insurance, with an enormous asterisk on it because what he actually invented was showing up at burning buildings with a bunch of slaves trained to fight fires and offering to buy it off the owner for a fraction of its not-on-fire value. He thought these skills translated into the military realm and raised a few legions at his own expense and led them into a land war in Asia. It ended exactly as you expect, and recovering the 'Eagles' - the standards of those legions - was a major deal for Roman geopolitics for decades afterwards.
The American Mark 14 torpedo used during WW2 was a complete shitshow of a weapon - it ran too deep, its magnetic trigger either went off too early or not at all, the contact trigger didn't, and it had a tendency for its rudder to get jammed so it would do a complete loop and sink the submarine that fired it. It took half the war for the problems to be admitted.
The saga of the rifle America used during Vietnam, and control of that being wrested away from the army and into civilian manufacture, is usually seen as a conflict between selfish empire-building and picking the best tool for the job, but to this day there are people that don't agree on which side was which.
Institutions are run by people. People can be wrong. Sometimes just because they're not good at their job, sometimes because the right answer is disadvantageous to them, sometimes because the wrong answer is more popular and going against it can cost that job. And when a person is very wrong for something that is very important, it takes a very well run institution to prevent them from digging in their heels about it. A major flaw in the human brain is that it thinks the consequences for being wrong only come due if you admit it.