The state has two broad functions here: it dispenses justice and punishes the wrongdoer, thus rebalancing the scales of justice, and it protects the people of the state by identifying a cause of harm and preventing it from causing further harm. In much the same way, the state is also now expected to make sure that rotten food isn’t sold in shops and substances judged to be dangerous, like heroin, aren’t freely available. We pay taxes so the state will keep us safe.