The penal code generally refers to the criminal code. The criminal code includes crimes and there punishments. So, when someone faces the law for committing a crime, the penal code contains the penalties that they may face.
I believe that punishment should always follow crime when the criminals will not learn otherwise. However, mercy also can cause a person to rethink their ways and change for the better.