system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Why are judges given discretion in deciding penalties for crimes?
gpt
In theory, to make sure the punishment fits the circumstances surrounding a crime. 

If someone robs a convenience store because their kid needed lifesaving medical treatment and the person genuinely appears to feel terrible about it, yes he still deserves to be punished. But, most would argue he shouldn't serve the same sentence as someone that did it because they're a sociopath, and generally acted like an unremorseful dick.

It's basically impossible to codify all the potential variables in a case into law, and the law's complicated enough as it is.