Jail in a perfect World would be the place where real Criminals would be put while they underwent extensive training in order to return them so a state in which they will be a benefit to society. Many criminals can be rehabilitated.
The reason we [the USA] continue using incarceration as much as we do is because our elected representatives do not want to be viewed as soft on Crime. Supporting rehabilitative approaches smacks of a Liberal ideology that rankles certain factions of the electorate, so legislators choose instead to pass laws that increase the use of prisons and make sentences even longer. Many voters like that. 
Jail is a facility used by those who approve of
revenge justice) to imprison people they don't like. The US prison population has been rapidly increasing in recent decades. The United States currently has the highest rate of incarceration in the entire world.
Criminologists and legal scholars in other industrialized nations say they are mystified and appalled by the number and length of American prison sentences. 
Corrections Corporation of America
Some states of the Union, Idaho, Kentucky and Mississippi and Texas, have ended their contracts with Corrections Corporation of America (CCA), a for-profit company that makes $1.7 billion each year for imprisoning people. The facilities run by CCA had a track record in those states for human rights abuses and mismanagement bordering on malfeasance. 
Corrections Corporation of America (CCA) is one of the largest for-profit prison corporations in the United States and a major force in anti-immigrant lobbying. Commenting on recently adopted anti-immigrant legislation in Georgia, Larry Pellegrini of Georgia Rural Urban Summit said, "They [CCA] will benefit by the legislation. They have a corporate stake in it around the country." See also Capitalism.
In Norway mass murderer and Neo-Nazi Anders Breivik was sentenced to 21 years for killing 77 people. The sentence can and probably will be extended. Anders will spend his imprisonment in a 3 room suite with television and Ikea style furniture. Why? Relaxing surroundings make easier the stressful task prisoners face of confronting their crimes and recognizing what they have done. it's unlikely that Anders can be rehabilitated but other Norwegian prisoners become better citizens through that system. Overall the Norwegian crime rate is lower than that in the USA or the UK.