It may be frowned upon; but, it's legal. Even in 1865, prison labor was scene as "acceptable" slavery. It's the exemption in the 13th Amendment to the U.S. Constitution: "Neither slavery nor involuntary servitude, except as a punishment for crime whereof the party shall have been duly convicted, shall exist within the United States, or any place subject to their jurisdiction."