Back in the day, courts were very different.
Prisoners were not allowed to see evidence against them before trial, but they needed to produce a written defence. This should be read aloud in court.
The problem was that poor people often couldn't read ór write!
Judges on the other hand, were usually well educated, wealthy and a lot older. Very often they judged and condemned those from a much lower social class and they didn't always give a fair verdict. They would give a: 'guilty' or 'very guilty'.
If prisoners (until 1774) were found 'not guilty' in trial they would still pay 'jailor's fees'. But mostly they couldn't pay and they would still be sent back to prison (this time as debtors).