The JCPOA enrichment limits would have started to expire this year, and soon Iran could have completely legally enriched as much as it wanted - while getting hundreds of billions via JCPOA sanctions removal. Given what it took to get Iran to this state under sanctions, it would have been impossible to force it to renew the limits or give up anything on nukes. We'd have ended up with Iranian control of Hormuz at the very least, likely of Gulf as well.
Perhaps that's an acceptable cost of avoiding higher gas prices right now - except Iran would have had the capacity to decide these at will. It's a fair choice, but best to be aware of the consequences.
You don't think Iran would have renegotiated to extend it further? If not, why would they even bother top follow the agreement in the first place? The legality of what they do has never been a consideration, they are a sovereign nation.