Right.

Maybe one more obvious reason why suicide is illegal is to try to discourage people from trying it. That is, you can try it, but you'll be in big trouble if you fail.

I do wonder what the general public's reaction would be if suddenly it was announced that suicide is legal.