Amen.
"Prosecutors said the sentence was appropriate and an appeals court agreed."
Prosecutors will almost always say this about harsh sentences. They'll always push for statutes with harsher sentences too. This isn't because they all believe harsher sentences are warranted. It's because they want people to shut up and plead. The higher the possible sentence, the easier it is to get people to accept fairly long prison terms and plead guilty. Longer potential sentences make it such that they have to try even fewer cases (only about two and a half percent of all felony cases ever make it to trial in this country). I don't know that folks are deterred from committing crimes so much by longer sentences. If the thought of going to prison for a few years doesn't deter them then they aren't likely to be deterred by the possibility of doing longer than a few years. Most of them are convinced they'll never get caught anyway, especially when it comes to drug crimes where there are no victims or witnesses who will come forward and alert the police to the fact that a crime has been committed, provide evidence for a conviction and demand that the police do something. People are though certainly deterred from taking their cases to trial if they do get caught and the potential sentence is a really long one, much longer than they could get get with a plea bargain. And of course most all plea offers involve punishments significantly than a person could get at trial.