I note that no one has answered your question about what Israel would gain by intentionally attacking an ally.
A+Bert, RCW2001, etc. - those were some vitriolic threads.
Israel did not want the U.S. to know that Israel initiated the conflict with Egypt, but was claiming Israel was attacked first. Israel was appealing to the U.S. for military aid but did not think the U.S. would support them if the conflict was instigated and initiated by Israel.
If the Liberty was sunk and the attack blamed on Egyptians, the U.S. would be more likely to support Israel in the conflict since a U.S. ship had been sunk by the "Egyptians."
Israel was killing civilians and trying to hide this fact by taking out an NSA platform that could reveal those details.
I do know is it is pretty hard to mistake an American vessel.