I think you cannot compare those two cases one-by-one. Swartz was fighting for the freedom of information, and that is an essential part of freedom at all.I might be mistaken, but for Tornado Cash I cannot see much beneficial uses for the overall society, and it is probably mainly used to hide criminal activities. I don't argue that it is ok what happened, but I want to differentiate: Just like for the freedom of speech: it is also important **what** you say and what you intend. It is not a general right you may claim for anything, including hurting others. Respect and responsibility must must go hand in hand with the exercise of civil liberties.
People who write open-source software have no say over how it is used. There are many positive ways Tornado Cash was used, which you can hear about, but I'll just share one. Writing software that gives fleeing refugees an opportunity to leave their country without funds (mixed) later being seized (by a regime filing a claim with hosting nation against the refugee) by an authoritarian regime is rather noble. The fact that the same software can used for illicit purposes and the developer being charged for the wrong doing of others is nonsensical, arbitrary and overreach. Developers can write software for a purpose. Very often their software gets used for purposes other than what the developer intended.