This chapter kinda explains it, before the guillotine, they used large sword or axes and if they missed it would a painful death. As far as public execution, it was to teach people to obey the law. No one wanted to be publicly humiliated. People would think twice before committing a crime...