There is actually a very simple explanation: sometimes you may find a bag of dry beans that ends up on grocery store shelves that contains actual rocks, lumps of dirt, and plant parts like twigs and leaves, but don't be alarmed: it's actually quite natural. This is due to the harvesting process, which can gather small debris surrounding the plants, and those bits accidentally pass through the farmers' separating devices.
Therefore, you may find a Helpful Hint label in the back of the packaging.