Fact is that firing squad "as an example" of soldiers in the very hard days of the trench war was a widespread practice in all armies.
The French used the "decimation": random shooting of soldiers of units that behaved in a coward way, according to the judgment of commanders who rose to their ranks in the period 1871-1914, a period that saw continental Europe without major wars, and were absolutely unprepared for an entrenched "position war".
The "1914 Christmas truce", the slaughter battles where tens of thousands of soldiers died just to put a small paper flag a couple of inches further on the map showed a complete disregard toward the soldiers on the battlefield.
This disregard contrasted with the new social situation in Europe and the resulting tensions in the years after WWI are well known to all of us.
My country wasn't an exception. Hemingway in his "Farewell to arms" well describes the summary trials (always ending with a firing squad) of the disbanded soldiers after the disastrous Caporetto retreat. The then commender in chief of the Italian army publicly attributed the defeat to the cowardice of soldiers, thus hard punishment of soldiers was the "right" solution. Nearly 4000 Italian soldiers were shot not even waiting the dawn, but when the ink on their sentence wasn't yet dry.
Some additional infos here, although I do not agree 100% (http://en.wikipedia.org/wiki/Battle_of_Caporetto)
The fact that the "Strafexpetition" was well organised with fresh German forces freed from the Eastern front by the peace of Brest-Litovsk and that the Italian high brass simply disappeared during the attack (of Pietro Badoglio, who was the commander of artillery and was the only person who, in the good old fashion that soldiers cannot think but just obey, order an artillery barrage, simply vanished and his whereabouts in the three first days of the defeat are still unknown) were not taken into account, or otherwise this would have meant showing to all the Nation how bad was the war run.
Strange enough even if not individually, there was some kind of pardon for all the soldiers of WWI during the Fascism, that pretended to base its strenght on the WWI veterans and simply wiped out any reference on the accusation of cowardice and treason even from the "Song of Piave".
All this rant to say (IMHO) that a pardon to individuals can bring some pride in their families, and this is enough to justify it. But it also set clear that soldiers fight for their country at the risk of their lifes, but themselves are part of the Nation and their lifes are precious.
Andrea