So will punishing future crimes. If people see that criminals have a history of being punished in their past "for no reason", they won't wan't to become criminals as much.
If it appears to be happening "for no reason", most people will infer a much more plausible causal explanation than time-traveling punishment — for instance, that this type of hardship contributes to people becoming criminals.
Here's an edited version of a puzzle from the book "Chuck Klosterman four" by Chuck Klosterman.
When should you punish someone for a crime they will commit in the future? Discuss.