Does Github have the right to take it down? Yes.
Is it unethical for Github to take it down? Not at all.
But should they? I don't know, I don't think I would have. It's kind of scary to use cloud services where it's hard to tell if your content might be judged in violation of some rule and might suddenly disappear as a result. If the offensiveness were more extreme (say, a repo dedicated to making fun of the mentally disabled), then yes, remove it... but the actual case here looks pretty benign to me. A poor choice of words, but with no intended malice. Coming down hard in this case looks arbitrary and unexpected, and arbitrary and unexpected rule enforcement is scary.
Certainly, though, it's Github's choice what kind of rules they want to enforce and whether or not they care if this scares users.