Whether true or not, the intention behind drug laws is physical harm and addiction. Additional harms like risk of violence or overdoses due to impurities are secondary at best.
Unless there's judicial activism going on, making that admission is pretty much just handing the keys to freedom over. Why even bother with a trial? Should have done a plea bargain.