According to what I've read, Swartz circumvented multiple times, in an excalatory manner, the attempts of MIT sysadmins to block him. At some point JSTOR disabled access from all the MIT network for several days. If his attempt at "liberating" the JSTOR database were successful, it could have permanently harmed not only JSTOR, but also MIT, as other publishers would have become reclutant to give MIT subscriptions unless it revised its open-access network policies. Publishers could have started to require individual accounts, or pay-per-download, or other forms of strict access control that would have negatively impacted legitimate users.
Swartz also knew that what he was doing was most likely illegal.
I'm sorry for his tragedy, but I don't think it's fair to say that he couldn't foresee the consequences of what he did.
http://unqualified-reservations.blogspot.com/2013/01/noam-chomsky-killed-aaron-swartz.html
Summary: Moldbug on the Aaron Schwartz affair. Power is a very real thing with real consequences for activists, yet many people don't understand the nature of power in modern times. People like Noam Chomsky get great fame doing bad epistomology about who has power, and as a result do great harm to idealistic nerds who don't read between the lines to selectively target their attacks at weak institutions (Exxon, Pentagon) instead of strong ones (State, academica incl. MIT).
Here he returns to a theme that is one of his real contributions to blogospheric political thought: that victory in political competitions provides Bayesian information about who has power and who doesn't. If your worldview has the underdog somehow systematically beating the overdog, your epistemology is simply wrong - in the same way, and to the same extent, as a geocentrist who has to keep adding epicycles to account for anomalous observations.
This means that activists like King, Schwartz, and Assange are only effective in bullying the weak, not standing up to the strong (despite conventional narratives that misassign strengths to institutions). When such activists stop following the script, and naively use the same tactics to attack strong institutions, reality reasserts itself quite forcefully: