Black holesA non-rotating black hole can have an electric fieldsfield, but the difference between electric and magnetic fields depends on the restframe. An electric field in motion generates a magnetic field and vice-versa. Hence, black holes can be said to have magnetic fields, in particular if they rotate. Electric and magnetic fields always come together.
You may instead ask why a black hole has electric charge but no magnetic charge. That's because in Maxwell's theory of electrodynamics, there are no magnetic monopoles. If there were magnetic monolopes, black holes could also have magnetic charge. (These things are known as 'dyonic black holes'.)
As to why the electromagnetic field of a black hole has the form it has, that's simply what you get if you solve the Maxwell-equations coupled to General Relativity.