My friend and I had an argument about the subject. He argued that in some circumstances it should be legal to consent to be killed (e.g. if the dominant kills the submissive during the BDSM session and both are OK with that).
I found that idea rather stupid because, in my opinion, it would make society less safe to live in. But I wasn't able to win the argument, because I didn't have enough information about the topic, that's why I am trying to figure out it now.
As far as I understood, in most countries (probably all of them, but I am not sure) it is illegal to kill a person no matter if they consent to it or not. What I want to understand is why they can't consent. What is the reasoning for lawmakers to design the law this way and not another?
I tried to Google the question, but for the most part, sources just state the fact that it's illegal, and not why it is illegal. And the ones that do explain the reasoning explain it in the context of euthanasia, and it's not what I particularly care about (in the context of this question of course).
(The question was originally asked on law.se but people there became unhappy with it and told me to ask it here instead)