A thousand light years away, you are looking a thousand years into the past at a 12 mile wide collapsed star Incredible
The simple answer is that a pulsar is a remnant of what used to be a regular star, all of which spin due to the way they're formed. All gravitationally bound celestial objects have spin due to the physics of how they're formed. Even simpler answer: Because gravity, that's why.