I think the main purpose of punishment is to teach people a lesson. When someone does something wrong, punishment helps them realize their mistake. It makes them think about their actions and hopefully, they won't do the same thing again. This way, it encourages people to behave better in the future.
私は、罰の主な目的は人々に教訓を与えることだと思います。誰かが悪いことをしたとき、罰はその間違いに気づかせる助けとなります。それによって自分の行動を考えさせ、できれば同じことを繰り返さないようにさせます。こうして、人々が将来より良い行動を取るよう促します。