Your comparison of TPB to a library overlooks the fact that the library (each individual library system, actually) purchases/liscenses/contracts the content they lend. TPB finds someone else who has purchased/liscensed/contracted content and takes it without having contributed anything to the authors/owners who created it. They do this at a scale that dwarfs the content cycle of a single library system.
The assets of a library also come with limitations (return dates, access limitations, DRM, content expiration dates) which would require a user to purchase the content if they want unfettered, indefinite access to the content. A pirated version of software and other pirated content has no such limitations and there is significantly less incentive for a pirate to convert to a legitimate copy.
You can certainly rationalize and encourage theft by playing the "poor people should have expensive stuff too" card, but most librarians would cringe at your argument. I'm all for helping people out and for free access to information, but if you want to own something (and I'm sorry, but unless you are getting firmware for a pacemaker, software is a want) you buy it. If you can't afford it you don't buy it or you find an alternative you can afford. Amazing how that works, ain't it?