That may not always make military sense depending on the sophistication of your troops, your enemy's and your CnC capabilities.
Consider what happens if a leader gets taken out. That quite possibly will demoralize and/or take out decision-making capability for the entire unit.
Read up on the successes of the Germans in early Eastern front. Turns out that, at least for tanks, the Germans could easily spot and identify the unit leader (only ones equipped with radios). Take them out early and the whole unit would mill around and remain as shooting ducks. The rank and file weren't trained for initiative and they probably feared an NKVD bullet if they retreated.
Ditto life expectancies for Lieutenants @ D-Day, with nicely marked up helmets. Or Lieutenants landing in hot LZs in Vietnam.
OTOH, the British armed forces have always relied heavily on their NCOs, it's what makes them good. So the officers could afford it, to an extent. Russia for example, is traditionally very light on NCOs, it's basically officers and soldiers.