All corporations are political. By accepting the ICE contract previously it was political. Now by reversing they would be changing sides. They were already in the political fray.
This is only the case if you can find a substantial number of customers Github has turned away. As long as the stance was "as long as it's legal," they stayed out of politics. They were willing to take ICE on as a customer, and they would have been willing to take on organizations fighting against ICE (if for some reason they needed software). That's impartial.
Trying to say that taking on the contract is a political decision just sounds like your forcing your political stances on Github itself... Github had never implied they took politics into account when taking on a customer.