I know that all of the city and county buildings, here in Tucson, have had metal detectors, since the early '80s. EVERYBODY - employees, judges, lawyers, as well as the public - has to go through them.
There were several high-profile drugs trials here and on several occasions, weapons were found stashed in restrooms, outside of the courtrooms. That prompted the detectors. Whenever there's a case like that now, detectors are also set up outside the courtroom.
Since 9/11, you cannot get into City Hall, without a verifiable appointment and, unless you're under arrest by the FBI, you can't get into the Federal Building at all.
I can't believe that security was so lax in New York City, of all places!