Israel Wins a Round in the Proxy War With Iran

Why did the IDF launch an attack on the Palestinian Islamic Jihad, knowing full well that this would lead to rocket attacks and counterstrikes?
Why did the IDF launch an attack on the Palestinian Islamic Jihad, knowing full well that this would lead to rocket attacks and counterstrikes?