In the process of world-building for fantasy/sci-fi writing, we not only need to make up laws for our worlds, we need to think about how the laws are enforced. Without any enforcing of laws, chaos arises. Why shouldn’t someone steal all your stuff if there were no consequences? Why shouldn’t they stab you to death to get a chance at your wife/husband? Or do it just for the hell of it?
Most people don’t look forward to going to jail for long sentences, being hanged or beheaded, being put in the stocks, or whatever other punishments your world has. Many early societies didn’t have actual police forces to catch the criminals— families often had to catch their kin’s murder themselves. Among the ancient Norse, when some one killed your brother, you were free to kill any member of the murderer’s family in vengeance.
More civilized societies as in most sci-fi worlds have a system more similar to ours. Criminals need to be caught. Perhaps technology will give better ways to find the criminals— we see that already in places with CC-TV cameras everywhere, and the use of DNA identification.
In our world some charming people have decided ‘defund the police’ is a cool slogan, but they get dismayed by a resulting crime wave that affects them. Being a person tasked with law enforcement will always be a tough job. You have to gain control of possible criminals who are high on drugs, or drunk, and who may be belligerent and think there is nothing wrong with what they have done— even if it’s murder. And if a law enforcer makes a mistake— catching an innocent person, who dies in police custody— they can get called murderers, even if they had no way of preventing the death.
Some people think that looting and shoplifting from a business is OK because the business owner is insured and rich enough to afford insurance rate hikes. But people who own a business, large or small, aren’t in business just for the fun of it. The business needs to make enough money to cover the costs, both of the wholesale cost of anything sold and the cost of paying employees’ wages. As a bonus, the business owner usually expects a little money for his labor— if he’s not getting it, he might as well go home and do things he likes.
High shoplifting rates, or an incident of mass looting, makes businesses go away. That’s why so many urban ‘bad neighborhoods’ don’t have any of the chain discount stores in the area. They have individual stores with higher prices, because of the shoplifting rates.
My father, who worked as manager in a discount store most of his working life, dealt with shoplifters all the time. He liked to say they had never caught anyone stealing a loaf of bread. I think what he meant was that people didn’t steal basic food items, but things they didn’t need to survive.
Out-of-touch people think looting is OK because it means people— including non-employed Leftist professional protesters— get fed. Real-world poor people tend to get food it more legit ways. If there are no wages to buy basic foods, they panhandle, or apply for charity/Food Stamps, or go to a food bank or soup kitchen. I’ve never panhandled, but I’ve done some of the other things— food banks are frustrating when you have to be on a low-carb eating plan and most of what they have is Hamburger Helper and ramen noodles.
Some people think training the young people with the Ten Commandments and the Golden Rule would help reduce law-breaking. It might— a lot of crimes that are common now were less common when most kids were taught these things in home, religious education and school. But this training gets overcome when there are loads of people promoting ‘situational ethics’ or the idea that there are no absolute rules without exceptions.
Not murdering and stealing are good rules. In a major crisis, we all agree that one may use deadly force in self-defense or the defense of others, and in an apocalyptic situation one can break into a sporting goods store to get a crossbow or ball bat to kill zombies with. But if your mind is filled with the exceptions more than the rules, you are always finding good reasons to break laws. You speed through the school zone because you’re running late. You steal ‘protein bars’ from the mini-mart because you’re hungry and you left your wallet in your other pants. You kill Joe because he flirted with your wife, or he cussed you out, or you want his stuff…. I have read about a lady serial killer who was a devout church-going Christian on the surface. But she kept feeding people ant poison when they caught her stealing to get drug money. I’m sure she knew the ‘Thou shalt not murder’ rule. She just got in a habit of not applying it to herself.
In fantasy and sci-fi stories, the shared moral rules may be similar to those of the Golden Rule and the Ten Commandments, or quite different. Maybe one rule is that you don’t say the Fearless Leader or Dark Lord’s name, or he will get you, through magic or technology. Maybe your hero will obey his society’s rules, or be looking for a better way. In either case there will be some sort of law enforcers to keep him on track.