Microsoft, being a U.S. company, had no choice in the matter. U.S. imposed sanctions on the guy. One component of sanctions is "Prohibition on U.S. persons (individuals or entities) conducting business or transactions with Khan."

If Microsoft didn't cancel his account it would be breaking the law by "conducting business or transactions with Khan."

So yeah, it makes sense for ICC to switch to a non-US provider, e.g. one in Germany, but it's not 100% solution because U.S. can impose secondary sanctions i.e. sanction the German company. I don't know if ICC sanctions include secondary sanctions but U.S. did that for Russian oil i.e. they said if e.g. Indian company buys Russian oil, they'll sanction Indian company too.