It's one of the best defenses against recidivism, but investment is lacking.