Not much sympathy for HSBC or its shareholder given the membership in the global banking cartel, which is hugely arrogant and corrupt, as are its advisers – especially its lawyers – in my view, but,
Regardless of whether those laws are moral or not, HSBC should have understood the reality of the political risk surrounding them. It is the risk that the US government may exploit ambiguities in regulations concerning sanctioned countries in order to grab as much money as possible.
Under the pretexts of the various never-ending “wars” (drugs, terrorism, organized crime, tax evasion, etc.), this unrestrained power to essentially seize (steal) any assets for any reason comes from OFAC, the Office of Foreign Assets Control, which is a part of the Treasury.