Answer:
They are reinforcing the prisoners fear of them. I can best explain with an example:
If a child misbehaves, and goes unpunished, the child may continue to misbehave, but if the child is punished, or sees their siblings getting punished for misbehavior, they are much more likely to behave and respect their parents.
The same can be said for the SS, by publicly executing the disobedient prisoners, they are showing the other prisoners that they are willing to carry out on any punishment for disobedience, most likely causing the other prisoners to obey.
Cheers!
-Fibo