In his diary and again in his memoirs (Infantry Attacks), a certain Lt. Erwin Rommel notes during the 1915 attack on Verdun "although the most extreme command measures were necessary, although the men were properly dug into fox holes by nightfall."
So just what is a junior officer's "most extreme command measure" you might ask? Presumably something along the lines of holding a pistol to the head of the soldier accompanied by words to the effect "Dig now; or I squeeze the trigger now." Possibly accompanied by much profanity to assist the soldier's hearing, and add emphasis.
In the aftermath, after grumbling at twilight about the lucky adjacent company that was sheltered in a wood and didn't have to dig in, Rommel's company woke up the following morning with one dead and two wounded. The lucky adjacent company in the wood had ceased to exist as a fighting unit; the French knew well the devastating effects of tree burst artillery fire.
This is why officers in line units are never issued a rifle - the time spent using one is always time spent not managing the survival of the whole unit. In this way it must always be an officer's explicit decision to pick up another man's rifle, and join the fighting line, when that is necessary to improve the unit's survival chance; but it is never to happen accidentally.