Emotions run too high in court rooms.
The innocent-until-proven-guilty defendant in a high-profile case will probably spend the majority of his time safe in jail. When his trial comes about, the defendant will be moved quickly by way of a secured path to the courtroom, wearing body armour if necessary.
Very difficult target, in the jail and on the move to court.
Now, once you sit that critter down in a courtroom, he loses the armour - because it might sway the jury either way on his case, he loses the screen of officers - same reason, and he sits in the same place for hours at a time.
This is what is known as a Sitting Duck.
Now, the Constitution of these United States guarantees each critter gets a fair trial before a jury of his peers, not a bullet in the back of the head by an outraged family member of the victim who has decided to circumvent justice by donning the mantle of Judge, Jury, and Executioner.
Now, on another paw, y'all may find this hard to believe, but many times the critter either doesn't want to be on trial, or may find it somewhat expeditious to leave the trial if said trial doesn't go his way.
And critters have been known to have friends and/or family who may be tempted to bypass the judicial process. Now, an armed assault on the jail doesn't usually get anywhere, because jails expect this kind of thing.
Ten or fifteen or howevermany cousins and/or friends with .38's sitting in the gallery of the court, now, that's a different story.
And it doesn't have to be deliberate. Chester the Molester may notice the custom Kimber in Joe Citizens waistband as Chester is being led into the courtroom. Little later in the trial, Chester's case gets a major setback when his victim decides to testify. Chester is looking at 99 years, Joe Citizen is flirting with the little darlin' sitting next to him and not paying any attention, and hey! All of a sudden Chester has a gun.
It don't get pretty from there on out.
Incidentally, kids, weapon snatches are the reason why I don't carry a weapon when I've been the escort on court duty.
As far as officers go, if a Peace Officer is a family member of a victim of a particularly nasty crime, that Peace Officer doesn't get to take his weapon into the courtroom either. Not anyplace I've ever worked.
LawDog