To oversimplify, the only value that prison provably offers to society is the crimes prevented by keeping someone who would have done crimes locked up. Pretty much all of the other supposed benefits like deterrence (not doing a crime due to fear of punishment) or rehabilitation (becoming a better person in prison) don't actually exist in real life at meaningful rates. Because it costs so much to keep someone in prison, it's actually really hard to find cases where the harm to society for the crimes they would have done justifies the investment of resources to imprison them. That doesn't mean no such cases exist and we shouldn't have prisons, but they are clearly overused when they are almost the default method of crime consequence in Western society, especially for minor property crimes like retail shoplifting.