I'm curious to what extent this comparison holds true for the content these two systems share. My (under informed) understanding is that piracy mostly traffics in movies, TV shows, video games, anime, adult content ahem, etc. While libraries loan some of those things, they mostly loan books.
If PirateBay was mostly promoting the sharing of fiction and nonfiction, I might be inclined to buy this argument for an educated populace. But I don't think that HBO's Game of Thrones or The Seventh Son really provide the same level of education as many (if not most) books a library would lend.