There is many things they can do to protect against terrorist attacks, has anybody seen the US Embassy in Ottawa? This building is literally car/truck bomb proof!
They can install stuff like Steel re-enforced columns that will stop a car or truck from smashing the Ops room wall, they can install laminate windows which would stop an AK round and will not shatter with the blast of a bomb, and an excellent set of cameras and a good perimeter fence.
They need layers of security!
Sure security guards can't do much in the event of a team of heavily armed gunmen, but he could press the alarm button!
Also, a security guard can stop people from tailgating someone as they enter the building.
The Idea of having a man trap is excellent! Swipe cards, retina scans, finger print scanners and all that biometrics is all nice, it just another way to control access, and make it harder for someone to get in.
So if I'm a would be terrorist, or some sort of spy and I wanted to get in, I'd have to pass through a security checkpoint at the gate, someone would have to lower the barrier for me to get in, then I'd have to enter the building through the man trap, provide a valid ID, have my fingerprints and eyes scanned, then I'd have to say " My voice is my password, verify me" and then the fancy do-hicky thing-a-ma-bob would open the other door to let me in. During all of this time, I'd have to watch out for all the security cameras, and hope I don't get caught!
On the other hand, I could get a couple squads of suicide bombers, attack with RPG's, blow up the fence and the guard station, blow up the man trap and make my way into the building killing everyone as I go.
Moral of the story, if someone really wants in, they're gonna get in!
But having all these layers of security, will deter most criminals or spies.
(why would a spy want in, not too sure, but hey, just trying to make my point!)