How does overcrowding and prison guard abuse worsen the behavior and mentality of a prisoner?

Prisons are a type of correctional facility, prisons are where individuals convicted of crimes serve sentences. The 4 main purposes behind prisons are to deterrence, incapacitation, rehabilitation and retribution, it pretty much deprives individuals of their freedom in a way of making them pay a debt to society for their crimes. Prisons are all over the world but the first “modern” prison was the Eastern State Penitentiary, which used solitary confinement as a way to give inmates time to reflect on their crimes and reformed. A summary review of the half-century expansion of police and prison power shows that debt, violence, and prison have served primarily political purposes in the context of deepening economic inequality. There are two different types of prisons, public and private. Public prisons are owned and operated by a state or federal government. The taxpayers bear the costs, and the operation is put under the control of government officials. While private prisons are built, owned, and operated by a private company that contracts with the government to house prisoners. The government in order to make budgets cuts, pays per inmate so the more inmates there are the more money is received. The problem with this is that these “companies” would keep half of that money and the rest of it wouldn’t even be enough for the inmates and their living conditions and requirements. This soon causes overcrowding and in return causes poor prison conditions which can even be life threatening to their health. Nowadays, prisons aren’t what they were first made to be. Prisons are also known to cause mental health illness to the prisoners like depression, anxiety, disorders that affect mood, thinking, or behavior. Prisons are like a boot camp but much worse, they can physically abuse you, torture you and the accommodations are made to be uncomfortable, this doesn’t only come from the prison guards but within the inmates as well.