We usually think of a prison as a place where men and women are locked up for breaking the law. But this is a very recent development in the history of prisons.
Centuries ago, nobles and men of importance were often captured and imprisoned for revenge or until they were ransomed.