Earlier quoted context omitted.
The same reason earth or the sun have a magnetic field. But the collapse of the star's core compresses the dynamo into a much smaller volume and speeds up the rotation due to conservation of angular momentum, thus making it more powerful. https://en.wikipedia.org/wiki/Solar_dynamo
But that requires an electrically conducting fluid. Neutrons aren't electrically conducting, are they?
Voila, spinning charges.
Current models indicate that matter at the surface of a neutron star is composed of ordinary atomic nuclei crushed into a solid lattice with a sea of electrons flowing through the gaps between them.