He got into trouble for breaking into an unsecured network closet at MIT and using MIT credentials to download a bunch of copyrighted content.
The whole incident is written up in detail, https://swartz-report.mit.edu/ by Hal Abelson (who wrote SICP among other things). It is a well-researched document.
I think the parent may be getting at why he was downloading the content. I don't know the answer to this. Maybe someone here does. What was he intending to do with the articles?
The report speculates to his motivations on page 31, but it seems to be unknown with any certainty.
Swartz, like many of us, see pay-for-access journals as an affront. I believe he wanted to "liberate" the content of these articles so that more people could read them.
Information may want to be free, but sometimes it takes a revolutionary to liberate it.
I think legally nobody knows why he was downloading the content to the point where he had to come to his hidden laptop to swap out hard drives of papers.
but also prior to that he had written the guerilla open access manifesto so it wasn't great optics to be caught doing that