None of us spoke negatively of using the principle of a cost to society as a basis for laws; we are merely saying that there should be a compelling public interest that can only be satisfied through that law. Not everything with a cost to society deserves to be banned, less we find ourselves totally in thrall with nothing permitted, no freedom, and no function beyond funding the government that supposedly serves us.
You are right to say that all laws are attacks on freedom, yet you immediately dismiss that as legitimate grounds for opposing a law. The religious right (well, not me) support laws banning gay marriage because of a perceived societal benefit - preserving our traditional society. The progressive left supports banning toys with Happy Meals because of a perceived societal benefit - eliminating childhood obesity. Both represent authoritarian behavior, which naturally stems from having such a powerful, all-intrusive government. Both are wrong. Neither goal, repressing gay visibility to the "good old days" or reducing childhood obesity, will be accomplished. But the negative effects of both will endure, and become the new baseline from which further assaults on freedom will be launched from both ends.
That is why we speak of a compelling societal benefit that can only be achieved using that law. Every law has a perceived societal benefit, and every law does societal damage, even if only a concurrent loss of freedom, which is why any societal benefit must be compelling, must be clearly achievable by the proposed law, and must ONLY be achievable by the proposed law to make that law worthwhile. Discouraging murder is a compelling societal benefit; oppressing gays and taking toys away from children are NOT compelling societal benefits. In fact, nothing for which the remedy can be as simple as minding your own damned business, whether the thing offending you is a gay couple or a butterball kid, deserves a law to ban it. Think principles, not issues, and preserve freedom as much as possible.