Note that blind belief in the latter causes the former to happen: almost everyone in the courtroom including the jury (most criminal trials are jury trials) assumes the defendant is guilty otherwise he wouldn't be in court. The notion of assumed innocent until proven guilty does not actually exist in practice.
Additionally, many prosecutors, police and people in the criminal justice system believe that, even if the defendant is ambiguously guilty of the crime they are on trail for currently, they are certainly guilty of other crimes they are not currently on trial for. Thus shading information to get a conviction in an ambiguous case is sometimes viewed as a public service. Interestingly this part of problem is not the result of malice or even ambitious DAs.
Additionally, many prosecutors, police and people in the criminal justice system believe that, even if the defendant is ambiguously guilty of the crime they are on trail for currently, they are certainly guilty of other crimes they are not currently on trial for. Thus shading information to get a conviction in an ambiguous case is sometimes viewed as a public service. Interestingly this part of problem is not the result of malice or even ambitious DAs.