I wish such sites would offer a direct link to download sample content without forcing users to enter an email address. You're never getting my actual email until I feel the book's good enough- why bother?!
I definitely hear you on this :P but it does help with conversion. A lot of people end up buying the book a few weeks/months later after we send an email about a new release.
I mean, you are getting free content in return though. I am very much against give-me-your-email-first designs that obfuscate what the actual product is or does until you fork over an email. But asking for an email address in a straightforward exchange for free content is not the worst thing.
I completely agree in that I don't like the practice either, but I will say that when I signed up when buying the original Fullstack React (for React proper) book, a lot of the emails were interesting pieces that were essentially supplemental to the book.