Courthouse metal detectors are designed to keep out the good people who are armed. A bad guy would just crash the door and start shooting. The best way to defend against that would be to have as many armed people inside as possible; ideally everyone inside should be armed. Obviously the people who work in courthouses and such are more afraid of honest people with guns than they are their competitor criminals. There is probably a good reason for this.
Much of what goes on behind those magical portals is rotten to the core and should be stopped. Rulings are made on a daily basis that are completely opposite of "liberty and justice for all". Juries are lied to and instructed to convict the defendant no matter how bogus the "law" may be. "The Law" must be upheld even as its fetid fluids drip down the arm of Justice. Real justice is swept aside while activist judges work to cripple any chance of freedom against the police state. It's no wonder the amoral beasts inside the courthouses feel safer with the layer of protection between them and us.
The metal detectors should be removed so that the authoritarians behind them would be more accountable for their actions. Of course, I feel that should be the case for every level of government. There is little danger of assassination if you do not spend your career destroying the lives and fortunes of the productive people in society. Since those who hide behind the magical anti-gun portals can't leave behind their life of parasitism and get an honest job, they fear us.