This is an interesting question. A lot of it comes down to special licensing (mostly for e-items) and the First Sale Doctrine for physical items. The library buys a digital/physical book, it is theirs to share as much as they want (although digital items do have limitations). No individual user owns the item outright, they are simply borrowing it. I guess that is really the crux. Pirates don't just 'borrow' items. They download them, keep them and the things sit on a drive somewhere forever, thereby skirting all kinds of legal agreements and other boring policies. Library items must be returned, thereby keeping the original copy number the same.
I don't really equate them to be the same. Here's my reasoning - take it or leave it.
If I check out a book, I make use of a library my tax dollars went toward AND I increase their usage stats, thereby upping demand. If everyone went and checked out a book, the demand would be really high and the library would buy more books/cds/dvds/games (assuming their users agree to increase their budget to meet all this new demand). Buying more items means more money for publishers and creators. At the same time, you're operating in a sharing environment. Not every person needs to own a certain book, you just need a good ratio of copies to people, so there are still items being purchased, but you're sharing them and decreasing the overall materialistic issues that come with consumerism. If everyone stopped buying books and started using libraries, it is my opinion that you'd have...
A) Healthier communities overall. Libraries provide many, many services and I feel they are crucial to community betterment.
B) Lots of items being purchased, but still fewer things being purchased than if everyone bought an individual copy. This is good. Less waste, still getting money into the hands of creators, etc.
C) Less incentive to pirate. The more use libraries get, the more money they get, the more things they can do, the more stuff they have for you. If you know you can go to the library and participate in this creativity-driving force, why would you pirate and fly under the radar?
To address some other points...
"A book checked out is a lost sale."
Yes and no. Sure, Person A might never buy the book they checked out, but Person B might go on and buy all the author's works because they loved them so much. This also ties into the 'try before you buy' thing. I'd rather check out a crappy book than buy a crappy book.
www.patronprofiles.com explains this further. (Yes, you could argue piracy does the same thing. Let's be nice people though.)
"People use copy machines to illegally obtain books."
Possibly. They might also just book steal one from a store, which would be waaaay easier. I wouldn't waste the time photocopying a 200 page book. At my library, it's 10 cents a page. So my 200 page book (assuming you can fit two book pages onto one 8.5 x 11 page) becomes $10.00. Sure, the creator is not getting that, but it certainly isn't free. I would rather just check it out, read it and return it like normal people.
"I didn't vote to have my library."
Maybe not. Carnegie established many we have today, but with the disclaimer that after he set it up, the community would have to fund it themselves, which they agreed to (at that time). If you live in a community where a library existed before you did, this argument is like saying you didn't vote to create the police/fire/EMS/water treatment. Just because you didn't specifically vote on it doesn't mean no one did in the past. And don't we all love police? I sure do. It would make no sense to close the library system, then vote to see if everyone wants to create one again.
"People check out CDs and then copy them at home."
There's nothing the library can do about this. I might borrow my friend's car and run someone over on purpose. Is it my friend's fault? No. (Putting aside all insurance liability stuff, of course.)
"Libraries are too expensive."
No, you're probably just cheap. You get back way more than you put in if you opt to use it well. They're extremely MMM friendly.
"Libraries were originally all private [therefore they should still be]."
Flawed argument. If all things remained in their original state, our hospitals would be reduced to magic shaman and cars would be noisy, slow behemoths of machines. Things change over time. Sometimes change is good.
"Library items are steeply discounted."
Probably not. Unless items are donated or the vendor puts them on sale because no one is buying them, libraries normally pay more for items to counterbalance the fact that lots of people are going to check them out. These higher costs are referred to as "circulation fees."
"My library's budget is hard to read."
Call them and ask them to demystify it.
Libraries are great things. Piracy is not so great. I've used both things. I prefer the library.