Community service is recognized as a form of punishment in modern criminal law, aiming to rehabilitate offenders through societal contribution.