The basis of laws is a moral code. Religion is a moral code. In fact, you can make the case that any moral code is a religion. Right and wrong get established from opinion, which then forms a moral code, and then is enforced in a religious manner.
It is not a FACT that murder is wrong in the same way that it is a fact we all get older as time passes. A society could exist where murder is OK. It is a moral opinion in our society that murder is wrong. And it is enforced in a religious manner.