Theft is theft and it is illegal, however morally there are grey areas.
As a developer I often need to purchase software licenses for client sites. There are occasions where I'll need to modify / extend said piece of software. Legally I must purchase the license first, however for numerous reasons this is not always an option. I may need to see the code-base before I can quote my client and to ensure the software is suitable.
I'm sure I'm not alone with this, I could make noticeable losses if I didn't fully research the software.
I also purchase a lot of books. Books are a little bit different. There a many reviews, samples and articles available to look at before purchasing any book (same goes for music, movies). The only thing I begrudge when It comes to buying books is paying extra for an ebook copy. I already own the book, why should I pay extra to read it on the train with my iphone?
Best Regards, George