I believe they were assigned with their prison jobs when they move from their temporary bunks. I remember when the real Piper asked about the jobs and all that in the memoir and it is the same thing in the series.