That example isn't the same at all. BitTorrent is just an application for torrenting. It isn't an organization centrally hosting content like IA is. Both Megaupload and Rapidshare are much more similar examples of sites that allowed anonymous distribution from central servers. Megaupload was taken down and Rapidshare ended anonymous file sharing after the Megaupload takedown.
MEgaupload and Rapidshare were taken down because they ignored takedown requests from rights holders and just gave them the middle finger. That was obviously a very bad idea.
OTOH all the hundreds of free file hosters that exist today don't get into trouble, simply because they take stuff down when notified.