You’re right, but how expensive is it to make sure that the people you are punishing actually are criminals, and how expensive should it be to make sure that the punishment is proportional to the severity of the crime?
Also, is prison about punishment, or is it about reform? (Trick question)