"The state" doesn't benefit in any way from locking people up. In fact, it costs them money (both directly and in lost taxes from the lost salaries and wages of those incarcerated).
An argument could be made that prosecutors benefit from higher incarceration rates through the incentives you described. And an argument could definitely be made that private corporations paying well-below-market rates for prison labour benefit.
https://en.wikipedia.org/wiki/Thirteenth_Amendment_to_the_Un...
https://www.aclu.org/news/human-rights/captive-labor-exploit...
We got 800,000 or so right now. Fight unemployment? Lock more people up.
Except they can force people to pay them more, all they need is plausible justification (like combating crime, or terrorists, or drugs, or viruses, or whatever the current societal scare happens to be about).