Thomas Szasz said this quote

The cruelty intrinsic to the workhouse system was excused by the need to discourage idleness, much as the malice intrinsic to the mental hospital system has been excused by the need to provide treatment.