Most facilities encourage or demand that inmates work or pursue an education. Even if someone is, G-d forbid, serving a life sentence, it is important to work.
Every human being needs their self esteem.
By working, they are contributing to their self-esteem. Some inmates look for ways to avoid working. On the other hand, some inmates look forward to going to their jobs. It gives them a feeling of accomplishment. Many inmates have learned new skills whilst incarcerated.