My understanding is that ESD safety things (mats, wrist straps, specially marked soldering irons) are designed to bring everything that can touch a component to the same electrical potential energy – ground.
But it seems unreasonable to expect that there's no voltage between my desk and the factory where my components were produced. After all, the factory is likely halfway across the world, and the resistance between here and there is significant.
So, say a component is carefully packaged and shipped to me in one of those little ESD-safe bags. Before opening the bag, I carefully ground myself and my workstation. Despite this, the component is destroyed as soon as I touch it because the ground that I tied myself to is much different from the ground that the component was tied to when it was produced.
What precautions are taken against this? Is it just something that can happen in theory but that isn't an issue in practice?