The code was taken down by a private company, where your free speech does not apply. This is closer to the debate about content moderation on social media, because after all, github is more like a social media site than most realize. GitHub suspended the developer accounts of their own accord, likely to cover their ass.
The Tornado Cash case is all about money laundering, the fact that there was code to automate the process is besides the point.