Part of the reason it was cancelled was because Iran was still funding a bunch of proxy armies and still developing non-nuclear ballistic missiles?
Cancelling the Joint Agreement is a case of cutting off your nose to spite your face. In particular, it was clearly an expression of Trump's animus to Obama.
Otoh, ballistic missiles eventually become a western europe/NATO security issue.
Not exactly sure how close Iran would be to that, but that is an element of the situation.