Magnetic fields.
The beams contain charged particles and so are bent bygenerated from charge particles moving in magnetic fields. The pulsar is the result of a large star collapsing and the magnetic field of the original star is compressed, making a very strong field.