Prior to mental asylum reforms, people who were mentally were often beaten and whipped by caretakers into submission and obedience. The conditions for these patients were filthy and they were not taken care of.
Patients with mental illnesses were not understood by the public or those who sought out to do something with them, so they were thrown into prisons, housed alongside criminals and abused, still, by their keepers.
Dorothea Dix saw that the mentally ill should not be held in prisons and should be treated, so she helped to make mental asylums where the patients could be taken care of. They were not beaten, and were introduced to "talk therapy" to help their illnesses.
Prisons were overflowing with people that committed offenses, so children were separated and put in juvenile detention facilities, mentally ill people were put in mental asylums, and criminal adults stayed in prisons.
Louis Dwight realized that the harsh punishments that the prisoners faced was not allowing them to have salvation. Their abuse did not make them change their actions, so a different approach was sought out. Discipline was instilled by adding a school of further penitence.
Prisons had less beatings towards their prisoners and were places of reform and penitence. Bible study was introduced, and this was one of the first times that prisons were seen as a place of rehabilitation.