The correct answer is security.
Prisons and jails are used mainly as a place for criminals to be held while they are awaiting trial or locked up once they have been found guilty and sentenced. Holding prisoners thus keeps dangerous members of society until they are rehabilitated. This ensure that the society is safe and secure.