Of course people act accordingly to the system they're in. If they expect punishment for an action, or not, changes their behaviour. By defining what's punishable, we can change the course of action. But if you look at any action which already happened, you can't blame anyone for it, because it had to happen that way, given the circumstances.