Such a project can only make it best effort and choose to rely on domains where it thinks it will have the least problems. Sometimes that isn't the US, and sometimes it is.
It's not global. It's unilateral.
> There's nothing stopping anyone from forking / rehosting these things outside of the US.
How can this be done legally, when access to the git repo was removed because he was an Iranian?
More importantly: FOSS projects thrive with global collaboration. If access is unilaterally restricted, while it's true the author could just take his local copy of the repo and host it someplace else, he will lose access to many of his collaborators. I'm going to go out on a limb and risk that Americans contributing to software projects hosted in Iran or in countries friendly with Iran are also going to be at risk.
This isn't being global, which was my point: this is being US-centric.
That's fair. Interpreting or framing this as [the US valuing a specific kind of influence on Iran over them valuing the benefits of collaboration] makes sense.