It may not seem like a good idea on the surface, but think about it for a minute.
These are dogs that were likely going to be euthanized. Most of them have been through a lot in their lives, abusive behavior being a common factor. The prisoners have also gone through a lot within their lives, many victims of abuse themselves early on, leading them down a road that they never shouldve been on, nor chosen. Combining these two together has proven to be a powerful decision as the results have been pretty amazing.
The dogs are learning to trust humans again, while the humans are being treated without judgement, an integral part at rehabilitation. They achieve a sense of accomplishment helping the animals, while clearly, the creatures help them to become better humans.