https://en.wikipedia.org/wiki/List_of_United_States_extradit...
"3. The Requested State may deny extradition for acts which: (a) violate provisions of law relating exclusively to currency policy, trade policy, or economic policy; " [1]
[1] http://www.mcnabbassociates.com/Switzerland%20International%...
https://www.aljazeera.com/news/2019/06/system-circumvent-san...
Now the vast majority of open source projects are controlled by Microsoft corporation which must obey the US goverent and this is the outcome.
Github was subject to US law before MS took it over; gitlab is not MS-owned but had to do the same (not sure about bitbucket but I imagine it's similar).
Whether the #1 place to host open-source projects should be owned by a company that makes a closed-source OS is a good debate question but it's completely orthogonal to whether they have to comply with US law.
I'm not saying I agree either with the sanctions or with Microsoft running github, but I'm saying you can't blame Microsoft for the current administration's sanctions on Iran.
Why haven't the ISPs cut off these countries?
Github has acted because github is under the control of a giant corporation, Microsoft or otherwise.
So there's a line that runs precisely from Microsoft acquisition to cutting off countries from the world's largest open source repository. It's a direct outcome of the Microsoft acquisition.
Now it is like an old grumpy grandpa you wanted to get rid off some time ago suddenly caught up with you and enforced some of the shittiest laws you could imagine.
But did they really need to enforce that block? I would imagine nobody would have noticed it and if github wouldn't be owned by a giant that enforces compliance to the letter, Iranian devs wouldn't be banned.
Not the fault of MS, sure, just saying that this is one of the disadvantages about the takeover.