If you can get up and whack him with a pie, what's stopping someone from using something with a bit more bang?
The answer to your question is NOTHING.
What do you expect, they have shot two US presidents and a pope, little chance for anyone from a determined assailant. It is just like airport security, mostly feel good theatre for the masses.