Earth's magnetic field isn't that strong in magnitude but it's huge, covering a region much bigger than the planet. It's the overall expanse (related to the planet's dipole moment) that lets it significantly interact with radiation.
Spacecraft magnetic shields are possible but a little different, and very easy to do. However I don't see the magnetic field causing any damage to the spacecraft unless it is changing quickly.