In the first place, the concept of "legislation allowing [people] to avoid behaving" in a certain way is incoherent. Say what you mean.
In the second place, the concept of "we need to prevent people from doing anything negative to themselves" is not distinguishable from the concept of "where there are multiple ways for people to behave, all but one must be prohibited". In fact, it's not even distinguishable from the concept of "where there are ways for people to behave, all must be prohibited".