The prison will be buying food ingredients in bulk so they will cost less, and the inmates will be cooking from basic food essential ingredients (eg no oven chips or instant mash,) and they will bake their own bread.
Some prisons have their own farms -
and the labour is free 
So it is possible to have a healthy diet in those circumstances - though it is likely to be monotonous and bland - but probably better than the diet of many populations in the 3rd world.