According to the book, “Spymasters of Israel”, the American ship was identified as an intelligence leak to the enemy and was politely asked at the highest diplomatic levels to leave the area. America refused. Israel removed the intelligence leak.
I’ve heard a similar story from the Israeli side.
But more specifically that President Johnson was effectively at war with swamp, very much like Trump, and the swamp wanted Israel destroyed. The NSA and State Department was actively helping the Arabs against direct orders of President Johnson.
So President Johnson Okayed an attack on the NSA boat thinking that the Israelis would sink it with all hands and all witnesses. But Israel chose a half measure.
Again, FWIW. I don’t have any more special knowledge than anyone.
But the above seems very logical.