Some countries are exporting with 25% trash. Do this long enough, and you'll find everything you can imagine (and things you wouldn't have imagined) in cocoa beans.
Long term planning and critical thinking are not strong in all parts of the world - especially when you may not know where you're going to get the money to buy dinner tonight. As a result, short term financial decisions are often made - such as "if i put rocks in this bag, it weighs more and i'll get more money today". In actuality, while this is true for today, what it means is that they're shooting themselves in the foot for tomorrow - as folks will catch on to the fact that they're not buying what they think they're buying. That said, if i don't eat today, i don't care much about tomorrow.
A fundamental shift across multiple origins around incenting quality at the grower AND exporter level is needed to change the mindset. It's incredibly difficult, and I don't believe it'll occur on a large scale quickly.