I keep referring to wiki articles, and the earth magnetic field one is quite ok.
So the answer is that the rotation of the earth plays a role, but it is not as simple as one to one. The dynamo theory proposes a mechanism by which a celestial body such as the Earth or a star generates a magnetic field. The theory describes the process through which a rotating, convecting, and electrically conducting fluid can maintain a magnetic field over astronomical time scales.
Now about the crabs, and the north sea: though in principle one can change the magnetic field in small regions changing the field on such magnitudes is not possible.
If you described the problem with magnetic fields and the crabs, maybe a solution could be designed generating strong magnetic fields to attract them to special points where they can be harvested/eliminated. Strong magnetic fields, orders of magnitude stronger than the earth can be made without too much expense.