(disclaimer: I make bean-to-bar chocolate)
As background, food often concentrates whatever is in the soil, and cacao perhaps more so. The shell around the cacao bean is a big filter, and tends to accumulate stuff. This concentration isn't specific to cacao, e.g. see rice and arsenic, etc etc.
Volcanic soil naturally has a lot of cadmium, for example, so you end up with it in the final product for cacao from some regions. The growing areas more popular with large manufacturers (i.e. cheaper cacao) just so happens to be areas with high cadmium levels, so there is a a bit of a correlation between cadmium levels and the size of the operation.
I've been told that pretty much all larger chocolate organizations do test each batch for cadmium, lead, etc. The smaller ones are usually sourcing cacao from higher quality distributors, and those distributors also test everything (and also do transparency reports on labor, handling, and such).
Fundamentally, the guidance on what is an acceptable level is not clear, though I cannot speak for the decision making at the companies listed in the article. CA's particular threshold considered low, and you can get equal amounts of Cd/Pb from a lot of other food sources (generally people don't eat multiple chocolate bars per day, but they might have a cup of rice and get a similar amount of cadmium). Maybe that's also a problem.
Lead though, really should not be in there. It's not from the soil, and it's mostly in the shell, which should be removed in processing.