Question about imprisonment and jail sentences

I’m not sure how original the inovation was. HM Prison Shepton Mallet (closed 2013) was "established as a House of Correction in 1625, to comply with an Act of King James I in 1609 requiring that every county have such a House. " HM Prison Shepton Mallet - Wikipedia. The 1609 law replaced the law of ?? 1597 ??. Apparently penitentiary were a bit of a 1500’s thing that (in England) later became less of a thing aa they were replaced by deportation, until the loss of the American colonies interupted deportation.

There does seem to be a distinction between a house of correction and a Gaol/Prison, which leads me to think that a “house of correction” was for prisoners deemed capable of correction, perhaps young first offenders, as an alternative to the death sentence or birching.

But I think that fixed sentences existed independent of regard for penitence and correction. Sometimes the motive for a fixed sentence for minor crime (begging or drunkeness) was just to get people off the streets.

Just locking people up, of course, was something that was always done. Henry II made a national order for prisons in 1166. But I don’t think that was for “a term imprisonment” – it was just locking people up.