You think they looked at someone who coded a piece of free software for image uploads, that was used by porn sites, and thought "he's a threat to our regime"?
Any citizen of an opressive country who doesn't support the govt is looked at as a threat, that's how regimes treat their citizens.
The accusations are a tool, not a reason.
And the more randomly the tool is applied the more effective it is in terrorizing people. IRI is basically broadcasting to Iranian expat community that: don't even think about technically contributing to software that can be used to topple us.
Smash a nose, freak everybody out, nobody says shit after that.