There are several issues here:
US law. I'm not an expert in this, but as far as know, it allows to make partial copies under these circumstances. I'm not sure about complete copies - there was a de-facto guideline for courts once that held it was legal to make copies for non-commercial purposes and not exceeding a certain number - often 7 is stated.
Newer legislation might have changed, though, among other reasons because with newer media like CDs (music) and CD-ROMs (software) the loss of quality is less. Also lobbies have been more pronounced.
Dine demalchuse. Much disputed, as you might know. Some say it only refers to laws that have to do with the king's treasury, read taxes, customs, official fees. Others say it refers to simply everything including laws that the majority of the people don't care about, like jaywalking which actually only plays a rôle in determining the guilty part in case of an accident. Frankly, those that hold the minimum are more convincing, and those that have a broader definition often argue with secondary (but maybe important) things like preventing anti-Semitism.
Din. Wow, you really want to know, huh? For this is a very difficult field. In short, you'll have difficulties to find many poskem who'd simply state yô, no problem, go ahead, copy and sell it. But there is no concept of intellectual property in Haloche. This is what haskomes in sforem were originally for: They weren't imprimatur stamps, blurbs or sale-increasing forewords by celebrity rabbis, but their main purpose was to say something like "The honourable rabbi Plôni has put a lot of work and time into his project, which came out nicely, and so I declare that anyone who'll reprint it during the next 20 years without his approval shall be under cherem." This alone shows that without such a device, copying wasn't considered forbidden.
Another possibility for a halachically valid copyright is a partial sale. The seller states at the time of sale what exactly is excluded from the sale, for example the right to reproduce it. (An interesting turn is that you could get the opposite problem of dine demalchuse: If you forbid to copy any part, this would violate rights you have according to US law.) Anyway, even for those who hold partial sales are possible for non-material issues, still the conditions of the seller stating at the time of the sale aren't usually fulfilled. It certainly isn't enough to have a sticker on the software CD saying if you break the seal you accept the conditions, because it's yours already. (Back to dine demalchuse - there are more and more court decisions saying these seals or the end-user licences you have to click OK when you install a programme aren't good, because it's known that nobody reads them anyway.) Maybe though, it might be considered self-understood that the seller makes this kind of partial sale - I'm not sure if this is halachically enough.
Next thing is the question if you have to pay the publisher something. If you wouldn't have bought it, you'll hardly find a dayyen who says you still have to pay - it's a case of "this one gains, and that one doesn't lose anything." If you would have bought it, rather than use the library copy, and disregarding all the points above, you'd still not have to pay the full price, because a photocopy (or a copied CD) doesn't have the same value as an original.
If it comes to the crunch, the publisher would have other disadvantages in addition. He is the one who wants money from you (hammôtze meichaveire olev horaye), and you have the right to invoke halachic opinions in your favour, even if the dayyen holds differently (kim li).
Morals. Fuzzy thing that. I could claim "we call that mitzves and haloche", but there is an element of codified morals. (By the way, personally I feel bootlegs are not fair towards the author, and to a lesser degree, the publisher.) Still, I wonder why in pre-modern times, neither Jews nor goyyim cared much about copyright, and if such an obviously time-bound feeling is relevant or not. Pressure from lobby groups is not a legitimate part of morals, unless it fits the moral anyway, in which case it doesn't add anything.
Lastly, publishing houses are producing books for money, as a rule. But authors might be happy if they get publicised, and authors of scholarly works typically even more so.
I hope it's clear that I don't simply give a hetter here. Go and see YLOR for more and a psak. When I'm grown up and open a publishing house, I'll see to it that I include a cherem haskome.
Update: more in the comments section.