The problem is that, despite being a signatory to the NPT, Iran was reported to be refining uranium to a degree of purity far in excess of commercial necessity. The NPT ultimately depends on trust. The US/Israeli strikes can be characterized as the expected response to a breakdown of that trust.