Even stronger if you believe things are deterministic there is no reason not to hold them accountable. You don't try to argue with a broken clock for it to become more punctual, you just trash it.
If you have a mechanistic view of humans, you know that punishment can cause changes in behavior, so you would use punishment to cause the changes that you would like to see. Punishment is fully compatible with determinism.