In Kerson Huang's book, The Fundamental Forces of Nature: The Story of Gauge Fields he notes that the principle of local gauge invariance "removes the last vestige of action at a distance from physics." The reason for this is that the job of keeping track of the field has been merged with spatial displacement via the replacement of the ordinary derivative in the Hamiltonian by a gauge covariant derivative.
The notion of gauge was introduced into physics by Hermann Weyl, the distinguished mathematician, in an attempt to unify electromagnetism and general relativity. It didn't actually work out in its original version, because, as Einstein pointed out, it implied unphysical effects. As often happens, with a little reinterpretation it was quickly recognized as a key feature of electromagnetism, and with the rise of the standard model and the idea of Yang-Mills fields, the key principle for all the fundamental forces of nature.
I find it mysterious but fascinating.