Actually, many would be deterred by legal penalties. Very simple cause and effect.
It's a waste of time IMO, to create laws intended to change human behavior, particularly on moral issues.
"Thou Shalt Not Steal". Stealing is morally wrong. Look, stealing is a religious and a moral issue! Do you object to laws against people stealing from you???
No, and I don't really object to this law. I just think it's a waste of good time.
Anyone that would want to steal from either of us will try to do so, regardless of what the law dictates. As they say, "locks are for honest people". Just as with laws.