Public executions were not all that uncommon back in the day. People used to come out in droves to see a hanging. I'm not a psychiatrist or anything, but there's something about the macabre that people enjoy. Never mind the display of power from those in authority by making said executions public does wonders for keeping the masses in line.