Once intended as sanctuaries for society's most vulnerable, they became notorious for their grim conditions, tragic deaths and dark secrets.