It's an effect of electricity, not just magnetism. Dielectricity is what powers magnetism. The better question is how is gravity the bending and warping of spacetime, which are objectively concepts with no physical properties.