It's even worse with the privatised prison system that the US has.
This is a state by state thing. FWIW in this case, ME doesn't have private prisons. I don't bring this up to imply everything related to this cut is on the up and up, however, I believe Maine is very much incentivized to make this a useful program in terms of keeping people from returning to jail (as opposed to squeezing every dollar from the prisoners).
Framing it as offsetting the cost would also make it very easy to increase the cut, bit by bit, until it gets to a truly unreasonable level. And since the person is already in prison and we have to pay for them no matter what, why would they choose to work if the deal is so bad?