Israel spent years focusing on intelligence, air power and state-of-the-art tech. It was preparing for the wrong war.