I remember reading somewhere a few years back that they have to keep pumping it in their antiquated infrastructure otherwise it causes problems to the infrastructure/wells. I tried to google it but it's hard to find.
It isn't unique to Iran, in general stopping oil wells is a risky thing. There's no guarantee it will start back up, and even when stopped it can leak combustibles.