So it's ok to be racist if the racists can be identified and then rehabilitated? Would it not be better if there were no racists at all, and the victims of their repulsive mindsets were spared? And for what it's worth, you can't change the nature of a racist, it's entrenched; it's why there are still pockets of staunch neo-nazis in Germany, despite the history of the nation and the continued introspection.
By your logic, it's ok to pickpocket and set buildings ablaze because we can just lock up the thieves and the arsonists.