From ancient times to recent history, [[TruthInTelevision this trope has been frequently been the standard]] for military uniforms, for a number of reasons.
For starters, pride and ExecutiveMeddling by leaders eager to have a fancy-looking army certainly play a part -- pleas from commanders that their men cannot walk, let alone fight, while wearing gold shoes be damned. Even for nations with saner leadership, however, military uniforms make an excellent way to [[ConspicuousConsumption prominently display a nation's wealth and industry]], and there are examples that even in RealLife, this [[TropesAreNotBad trope is not bad]].
The Romans, for instance, had entirely practical uniforms that still managed to incorporate bling of war in an incredibly intimidating way: imagine being a tribal European standing side by side with your HomeGuard armed and armored with [[BreakOutTheMuseumPiece family heirlooms]] and re-purposed farm implements, facing a Legion clad in identical gleaming armor bolstered with tanned leather, trimmed with practical and understated fringes and embossing... ''[[OhCrap and then realizing that these were just their foot soldiers]]'' as the guys with the '''really''' fancy armor rode up on horseback and started ordering them to march forward in lockstep.
The fancy war gear of the Middle Ages and Renaissance -- including etched and gilt plate armor, ostrich-plumed helmets, weapons inlaid with gold or silver, and horse trappings of precious fabric -- illustrates other benefits. As a conspicuous display of wealth, such finery in that context can reassure your allies, mercenaries, and your own soldiers that you are rich enough to pay them on time (this was very important in an age when taxation was inefficient and state bankruptcy was common). If you should exhaust your funds, then you still have assets in the form of bling that you can easily liquidate in order to raise more money. Furthermore, your war bling will advertise to your enemies that you are rich and capable of paying a hefty ransom, so that they will make more of an effort to capture you alive if they happen to get the best of you on the field.
A highly decorated[[note]]That idiom makes a lot more sense now, doesn't it?[[/note]] commander also tends to bolster his men's confidence, and is easy to locate and rally to in battle. For the average soldier, meanwhile, even small touches like a CoolHelmet and a [[SharpDressedMan classy uniform]] can be [[MagicFeather a powerful morale booster]].
This trope can also be subverted, because what may seem to be AwesomeButImpractical may in fact be both awesome ''and'' practical in action. The Winged Hussiars of Poland demonstrate: the large wing-like structures fixed to the back of this legendary cavalry group's armor may seem like impractical Bling of War... until you see modern historical reenactors in action, and realize the terror of being charged by a wall of armor-clad bird-angel-centaur-screaming-nightmare-things that you can't [[BackStab attack from behind]].
Brightly colored and flashy uniforms continued to be the rule rather than the exception well into the age of guns and cannons, precisely because of the limitations of early firearms. Smoothbore weapons firing round balls were very inaccurate. Troops had to line up in the open and fire huge volleys at the enemy if they hoped to hit anything, and the clouds of smoke produced by burning black powder greatly reduced visibility on the battlefield. Rifles were more accurate, but they became increasingly difficult to load as the barrel became fouled with powder residue, and their increased range and accuracy was negated when they couldn't even see the enemy through all the smoke. Thus, rifles were only normally used by specialized sharpshooters and hunters until the mid-19th century brought technological improvements that made mass-equipping armies with rifles feasible. Said sharpshooters did sometimes manage to pick off the commanders, but it still wasn't enough to make them lose the bling. In the confusion of battle, it was much more important to be able to be able to identify in an instant which officer was in charge of the situation, or whether the men approaching you through the fog were friend or foe. The tendency was to shoot anybody you didn't recognize, so the uniforms were important for preventing friendly fire. Changes in the technology of warfare eventually made these fancy uniforms obsolete, as the danger of being spotted by the enemy began to outweigh the benefits.
In modern uniforms, this trope tends to be heavily downplayed or entirely averted in the field, bling being a [[StraightForTheCommander good way to show snipers who to shoot]]. Modern field insignias and distinctive signs have muted colors and small size, typically a small patch painted grey on a black background on the uniform's collar. In ceremonial circumstances, however, BlingOfWar continues to be in full effect in many nations: uniform regulations are serious business, and you ''will'' wear your ChestOfMedals whether you like it or not.