It is very much in the state's interest to provide educational opporunities to prison inmates. There is a well-established connection between education and most crimes, particularly those commonly referred to as street crimes (white-collar crimes, involving educated people committing acts like embezzlement and financial fraud are a separate issue), including robberies and burgleries, assaults, auto theft, and so on. Those crimes are most commonly perpetrated by un- or undereducated individuals whose subsequent time in prison is often spent learning to commit more crimes from other prisoners, and whose freedom when released from prison typically involves difficulty finding work because of the stigma of having been in prison and the lack of education leaving the individual unprepared for a normal job. Consequently, recidivism rates for such individuals remains disturbingly high.
Research conducted by the National Bureau of Economic Research reached the following conclusion:
"Despite the shortcomings of the date and the crude estimates for some of the desired statistics, the results of the regression analysis appear to be highly consistent with the proposition that those with lower schooling levels and training, and hence lower potential legal income, have a relatively greater tendency to engage in crimes against property." [Isaac Ehrlich, "On the Relation between Education and Crime," National Bureau of Economic Research, 1975]
Similarly, a 2003 study by two professors of Economics concluded that "schooling signficantly reduces the probability of incarceration...the biggest impacts of education are associated with murder, assault, and motor vehicle theft." [Lance Lochner and Enrico Moretti, "The Effect of Education on Crime: Evidence from Prison Inmates, Arrests, and Self-Reports," emlab.berkeley.edu/-moretti/lm46.pdf]
Given that the average cost to incarcerate an individual for one year is around $35,000, and that the number of victims of crime is directly related to the number of undereducated men rotating through prisons, then the costs associated with providing educational opportunities for prison inmates is well-worth the expenditure. To the degree that prison inmates can become productive members of society, then everyone benefits.