You're right, if the law is written in a statute and the judge isn't given discretion.
As it is our system is so full of discretionary power that the Rule of Law, which Americans worship as an idol, really means the opinion of an official, subject to review by the opinion of a judge. But that's the Common Law for you! Always been that way too.
One cannot go back through the pages of American legal history and find it to have been noticeably more just than it is now. It's not as though there was a "golden age" of law in the US that has been lost because of some chicanery in the present. American law has always had grotesque flaws. But focus on trying to change them, and you will have everyone come out of the woodwork to defend "the tradition", etc.