Discretion is (in the minds of many) a necessary feature of the criminal justice system because not all crimes and not all criminals are exactly alike. Because there are infinite differences between individual cases of the same type of crime, it is important to have discretion exist as a feature of the system.
One example of this can be seen in the problems that are inherent to determinate sentencing efforts such as "three strikes" laws. When such laws are enacted, with mandatory life sentences, you end up having people sentenced to life in prison for acts which do not (to most people) come near to the level of severity that would warrant such a penalty. When discretion is not available, seemingly unjust results like that can occur. This is why discretion is so important in the criminal justice system.
Discretion as in Prosecutorial discretion is a must. The law should not be able to force a Prosecutor to prosecute ALL cases.
Judicial discretion is based on a possible sentence based on the defendant's prior conduct and recidivism rate, etc.
Police discretion is, unless the law mandates an arrest, it is generally discretionary for them to arrest on the spot. Also they have the legal discretion to issue a citation/ticket or not, except when based on race. color, etc.
These, I see no problem with.