I don't think this is right
afaik, In the US, it is almost unheard of, if not illegal, for someone to be prosecuted before committing an illegal act
of course, there maybe some rare exceptions
The initial charge was tresspass or breaking and entering on MIT property (the library, I have seen this myself, has sign on the door, use restricted to MIT people)
see here
https://swartz-report.mit.edu/faq.html
and here
http://swartz-report.mit.edu/docs/report-to-the-president.pdf