Actually, I was wrong now that I looked it up, the gas giants do actually produce their own magnetic field of significant strength. So it just seems like Earth is unique among the rocky planets in having a strong planetary magnetic field.
Thanks, Boogieman. It’s interesting.