The same way the United States does. Enemies within. Sloth. Lethargy.
I have always thought the Mossad was better than the CIA ( I mean, c'mon, if a communist like John Brennan can ascend to director of the CIA...). After all, they face existential threats everyday. But someone was seriously asleep here.