From what I've read it seems there's fault on both sides of the incident (Israeli and US governments, not respective militaries).
The Liberty was a spy ship that was ordered closer to the action than it should have been. Apparently the Israelis were not made aware of its presence.
Remember the circumstances: Israel in real danger. USSR heavily involved both in supplying and perhaps fighting for the Arab nations. US trying to get an unbiased handle on the level of Soviet involvement and the Israeli situation, and probably looking to pick up some technical intel at the same time.
The details of the attacks by aircraft and boat on the Liberty are in dispute, probably more due to fog of war than any intent to disguise. Remember years later a techically sophisticated USN Aegis cruiser shot down an Iranian airliner by mistake. Even the IDF makes mistakes.
Also important to remember the US had not yet become Israel's major ally. That was in the process of happening and was in fact accelerated by the Soviet's increased backing of the Arab nations.
Why would the Israelis have knowingly attacked the Liberty? The only answer would be to keep it from subsequently gaining some intel. Anything it had already picked up would be winging its way to Washington or would be recoverable from the ship and or crew. What intel could that have been?
The massacre story has been kicked around but has never been supported by any evidence...and god knows it doesn't take much evidence (if any) for Arab or some Euro nations to acuse Israel of wrongdoing. I'd suggest that's a non starter.
The nuke story is also sometimes suggested. Israel with its back against the wall was preparing its nuclear arsenal and was afraid the US would learn about it and stop them. While I don't doubt the Israelis would have been willing to roll out the nukes, I don't think they would have wanted to keep the info from the USA. In fact, there are more stories suggesting the Israelis TOLD Kissinger and Nixon they were preparing the nukes at least in part to push them to confront the Soviets.
There are also some stories the Liberty was using active electronic measures to appear Soviet and didn't want that capability to become known. With all that we've subsequently learned about the USN Sub technical intel missions this isn't that outlandish.
So what happened? Clearly both sides, then and now, wanted to bury the whole issue. That means both have something to hide. My sense is that the Israels shot first and asked questions later and probably didn't know it was a US ship until afterwards. Or their military screwed up... Maybe there were calls from pilots that were ignored. Maybe the US was spying on Israel as well as the Arabs and Soviets and didn't want to admit it or admit to some intel they gathered in the process or used in the process.
As is always the case, the little guys--the crew of the Liberty--paid the price for whatever really happened. And we probably won't learn the real story for years to come. Look how long it took for the Glomar Explorer story to come out...and there's still disputes about what was and wasn't recovered.
Mark Levine