But that's not prison labor. Prison labor specifically refers to penal labor. You receive no pay, because the labor is part of the punishment for the crime. It is the prisoner who is paying off his debt. In those cases, I don't think it is moral for private companies to make use of that labor for private gain. Penal labor should only be used for public benefit.
Here, we're talking about preparing someone for the job market when they leave. Hence, these are two separate concerns. You cannot substitute the former with the latter.