1. To prevent cruel and unusual punishment.
2. To set expectations about the seriousness of the infraction in the eyes of the law.
I am not a lawyer or a legal scholar, so I'm sure there are more reasons.