How in the world could lead get in protein powder?

I remember the articles from a few years back, but I never understood how lead could get into protein powder. Isn't whey protein a milk derivative?
Here is the quote I just read : In 2010, Consumer Reports tested 15 protein drinks for heavy metals such as cadmium, lead, arsenic, and mercury. Three of them had potentially harmful amounts of contaminants, based on federal safety guidelines.
That same year, ConsumerLab, which independently tests supplements, said nearly a third of 24 protein supplements they tested for quality assurance failed. Two of them had a potentially risky amount of lead. Others had more cholesterol or sodium than was listed on the label.

Like I said, I remember the scandal, because I think Costco sold a product that was contaminated. But I never understood the details of how these heavy metals can get into "milk powder".