I completed an online course some time ago on justice, mercy, and mass incarceration. They looked specifically at U.S. prisons, but there were a few points that resonated with me.
1. The justice system, at least in the U.S., is pretty biased towards people of visible minorities. This doesn't necessarily mean that all involved in law enforcement and the justice system are racist! There are many possible reasons for this.
2. There's a strong link between incarceration and poverty. Many, many people locked up in the U.S. are actually awaiting trial - they haven't been convicted of anything. One of the issues with this is that it's very impoverishing to a lot of families. Some people will simply decide that it's better for them to accept a plea deal because at least they will know when they're free to leave prison. The current system of money bail simply doesn't work for many people because they can't raise the money required to pay the bail. (I am not sure if it works similarly in the UK, but in the U.S. there are usually two or three ways you can get bail, unless the judge puts a restriction such as a cash-only bail. One way is that you can put up cash. Most people can't do that as it's too expensive. A second way is to put up a property bond, i.e. your home will have a lien on it if you don't show up. Works, but only if you own your home. A third way is to use a bail bonds company. You pay them 10% of the bail, which they keep as their usage fee. In exchange, they say that they'll be liable for the full bail money if you don't show up to court. If you don't show up, often called a "failure to appear", they send a bond enforcement agent, more commonly known as a bounty hunter, after you to bring you in. The problem here is that depending on what your bail is, 10% can still be quite a bit of money. Let's say you got $30,000 worth of bail - would be maybe about L25,000. 10% of that is still a lot of money, which many families can't afford to part with, especially because you won't get it back.) The issue with accepting a plea bargain, though, is that you'll have a permanent criminal record. This can make it more difficult for a person to apply for employment in the future.
3. There's a strong link between being incarcerated and going on to commit other crimes. This can happen for a variety of reasons. For some people, crime is all they know, because they don't have marketable skills. They may have substance use problems. They may be involved in street work (e.g. working in the sex trade). Often these problems can continue in prison. People can also learn from more experienced criminals, which can increase their involvement in criminal behaviour once they're released.
4. For some people, if they have exceptionally long custodial sentences, they can become so institutionalized that they literally can't function on their own. I have heard of cases where people were released after a lengthy sentence and were re-arrested sometimes days or even hours later. They had been in the prison environment for so long that they simply didn't know how to function outside it. So, they committed another crime so they could be put back into the system as that was what they knew.
Again, I can't speak to the UK specifically, as this was focused on the U.S. However, I strongly suspect that many of the issues that are observed in U.S. prisons are also problems in UK prisons as well.