A waste of resources? Well, that's obviously true.
Anyone sufficiently maladjusted to end up in prison must be given no other choice than to contribute to the prison system, by building, maintenance, food-production, and clothing-production.
It's an alternate lifestyle, for those wishing - by their actions - to live it.