You cannot prevent someone from robbing and killing you either. That doesn't mean the law has no value. It sets a standard for conduct and creates a psychological expectation. If violated, it enables punishment.