Prison's inhabitants are overwhelmingly the unemployed, the underemployed, and other denizens of the lower classes. The reality reflects the underlying fact that imprisonment is fundamentally geared to imposing retribution and deterrence on those who flout norms of property and order, or who otherwise translate the pressures of social marginality and material deprivation into violent or otherwise unacceptable behaviors.
The importance of violence to the punitive function of the prison has actually increased over the last several decades, in response to a deterioration of the conditions of lower class life wrought by structural changes including the demise of the manufacturing sector, the decline of organized labor, the onset of chronic fiscal crisis and the retrenchment of the welfare state. As these changes have consigned the poor ever more thoroughly to a world of deprivation and insecurity, they have placed a greater premium on the punitive function of violence in prison. Thus, the prerequisites of prison violence, as well as the root impediment to its eradication, may be located, not simply in failings of law and policy, but in the political economy of contemporary capitalism.
One argument is that punishments in prison must necessarily be worse than their typical conditions of life in the free world. Otherwise prison might lose it's punitive effect. It might then become a refuge from the deprivations and uncertainties of law-abiding life, sought after by the poor. Or more likely, it might lose its ability to deter or otherwise sanction the pursuit of criminality as a life course or as a reaction to debased life conditions.
Importantly, the fact that the kind of violence is illegal does not refute its relevance to the logic of less eligibility. To the contrary: that such violence is so thoroughly unlawful allows it to serve the state as a mode of punishment without the state ever confessing the true extent of its resort to such barbarity and without thereby surrendering much in the way of its legal and political legitimacy. Indeed, by deeming prison violence illegal, the state in its various manifestations can actually condemn the phenomenon, while yet relying on it as part of regime of control.