Really part of the genre of series of 'grim scenes from war' dating back to the 17th century in Europe.
The SS boys were doing a lot of this in '45, trying and hanging looters and deserters, when you'd think they might decide their time would be better spent skipping anywhere but east.
.
EDIT: On the other hand, if that seems too condemnatory: --- for all we blame or abhor these in particular, most of us in any army would do the same to punish those we thought criminal, or traitors.
And it's not as if the Allies were not embarking on a hideous orgy of punishing collaborators at the same time.