Inexplicably, the Saar 5 has only one Phalanx CIWS........and it is mounted on the bow leaving the stern totally unprotected by Phalanx.
The missile struck the stern.
Depending on how close to shore the ship was when it was hit, the vertically launched Barak system may not have had enough lead time to engage.
In any war, all services want a piece of the action. Be that as it may, sending a high value naval squadron to shell land targets that could be hit by air power is not a wise use of high value resources.
Naval surface warfare does best against other surface warfare forces in a blue water environment and does poorly against land based air power and land based missiles that operate from what is, in effect, a giant, unsinkable carrier.
You are right on target. Since the days of wooden sailing ships right up to today it's unwise to send ships against land forces. It's asking for trouble.
The one CIWS is similar to our FFGs, which also only have one. The diea is for the missiles to engage first and give time for the vessel to position itself to use the CIWS. If the missile is fired form too close...or if it comes in too low without adequate warning from other assets (AEW, AWACS, other vessels, etc.) then they do not have time to do either. That looks to be what happened here.
Given the short range of the IDF gunboats batteries, the vessel had to be fairly close in to protect them...it appears it was too close. This is a huge naval event with far reaching ramifications. Both sides wiull be studying and learning from it. Our forces will be learning from it and improving our own systems (which AEGIS system is better than the Saar 5 defenses).
Unfortunately, the Hezbollah, the Iranians, and the Chinese got a big coup from this.