It's social contract time, ladies and gentlemen. You sign up to abide by a common set of rules as the price for living in civilisation. Because, basically, civilisation means toilet paper and being able to do more than scamper through the underbrush hunting for pale white grubs to eat and shrieking at leopards.
So, yeah, if you run contrary to those common laws then you get spanked. Who writes those common laws is a huge part of all human history of course. Most of us feel that to be bound by the laws you should have at least the chance to influence them. Hence democracy.
Most right-wingers I know who get moralistic with 'degenerates' say that they are offending the laws of God. I don't buy this.