The clause is probably there to give GitHub some level of additional power to make judgements calls it may need to make, in situations that can't be anticipated.
It provides (or may provide) a stronger legal backing for GitHub if they have to terminate service for some reasonable reason that cannot be anticipated or enumerated in advance, in other words a judgement call, where the termination of service might be challenged legally or result in a lawsuit.
There are surely situations where action rather than pussy footing would be the right thing for GitHub to do, against a vexatious user with a penchant for abusing the service and using the legal system to incur costs on GitHub while doing so.
It would be much better if the clause was not so draconian. But I'm not sure what kinds of termination clause would protect GitHub in situations where it needs the flexibility to make judgement calls.
(ps. I don't want to imply the OP's GitHub account is in this category; I'm sure it isn't. I'm talking only about why the clause may be in the ToS.)