When criminals are locked up, they will get released and many of them don't have anything else to do other than returning to do crimes, with gained experience from the previous failures.
But it's possible to reduce crime by preventing it. Do not let dangerous districts form, build communities, reduce access to weapons and so on.