Building a tank factory is legal if you pay taxes and only sell your tanks to whomever the government lets you. Killing someone with a tank is not.
The answer is partially included in the latter part of your comment. Companies like NSO are "out-sourced" entities of the Israeli intelligence apparatus. If the shit hits the fan, as it happened in this company's case, then the intelligence agencies can say that they had nothing to do with it all.
There are companies like NSO all over the world, many competing in the same legal jurisdiction. Like I said upthread: nobody on HN has a weird theory about how an Auckland CNE/xdev shop is an arm of NZSIS, but everyone thinks they understand the IDF well enough to attribute NSO to it.
Some of us do, i.e. even though we might have never personally heard of those companies we almost automatically equate cybersecurity/surveillance stuff with state entities. In this geopolitical climate it would be foolish not to do it.
The thing that is different with Israel is that it has got its mandatory 2-year military conscription and that it has a dedicated cyber unit which is manned by fresh and very bright conscripts. Afaik no other state entity around the world has that.
According to The Guardian:
"...a senior White House official suggested that any possible deal could be seen as an effort by a foreign government to circumvent US export control measures. The senior White House official also said that a transaction with a blacklisted company involving any American company – particularly a cleared defence contractor – 'would spur intensive review to examine whether the transaction poses a counterintelligence threat to the US government and its systems and information'.
...
There were other complications. The Israeli ministry of defence would have had to sign off on any takeover of NSO surveillance technology by a US company and it is far from clear whether officials were willing to bless any deal that took control of NSO’s licences away from Israel.
...the person also said that the deal faced several unresolved issues, including whether the technology would be housed in Israel or the US and whether Israel would be allowed to continue to use the technology as a customer." [1]
Of these obstacles, it seems like the biggest was related to counter-intelligence, i.e. that the Israeli intelligence services could feed any disinformation they liked to the American intelligence services via NSO? That's how I read this, anyway. I'm a noob to this though, and would love to be corrected if I'm wrong.
1. https://www.theguardian.com/us-news/2022/jul/10/us-defence-f...