I believe Slack did this too; if you've ever signed-in to Slack within a country that is currently restricted, your account was just deleted without warning.
Except GitHub seems to be handling it a lot more professionally. A clearer written policy and process for appeals - as opposed to Slack that did a behind the scenes change and borked a bunch of accounts.
I assume you go there for vacation or a business trip (for some business that isn’t sanctioned) so it doesn’t make sense to remove someone’s account just for visiting these countries.