Publishers in general have a reputation for misreporting book sales, and there have been reports, based on indirect evidence, of grossly misreported ebook sales at some traditional publishers (for example
The Business Rusch: Royalty Statements). They can do this because they have an exclusive contract with the author, and so have an incentive to be lax (at best). They are also 19th century businesses in the 21st century, and they can't easily get from where they are to modern accounting practices. There is typically a mechanism for auditing, but it is rarely invoked and probably useless.
Your contract with sites like Amazon are generally non-exclusive, or at least can be withdrawn from at will. This means that they have an incentive to accurately report sales. If they ever got a reputation for misreporting sales, they would loose authors and their ebook titles in droves. Like a lot of modern finance, this system works on a assumption of honesty at the institution level and an assumption that your transactions are treated the same way as everyone else's.