Well, they are. Wal-Mart is providing Coca-Cola the service of getting their drinks to consumers; which makes Coca-Cola a customer of Wal-Mart.
This translates to Amazon. They are selling the rights to distribute one's books on their platform, and in return take 30%. Amazon provides a service, the bookseller pays them money. (In this case, that money is zero, but that's beside the point. In general, the seller is Amazon's customer.)