I buy directly from the publisher and have never had any issues. They might take a little longer to arrive, but they're always in perfect condition. Sometimes they even throw a free e-book my way, which I appreciate the hell out of.
I understand purchasing from other categories on Amazon, but with books it's so easy to avoid Amazon all together. Plus you know you won't receive a counterfeit (https://twitter.com/nostarch/status/1183095004258099202) if you order directly from the publisher.