Are dogs the key to bomb detection at airports?

How could a man who allegedly had explosives hidden in his underwear have been allowed to board a plane headed for the United States?