I assume that your question concerns the difference in symmetry between the Earth, which is spherically shaped even as to the layering of its inner core, outer core, mantle, and crust, and the magnetic field, which is a dipole field of cylindrical symmetry.
The answer is that the symmetry of the spherical earth is broken by its rotation: that rotation introduces an axis.
If the Earth (or the Sun) were not rotating, each would lose its magnetic field on a relatively short timeframe: mere decades for the Sun, tens of thousands of years for the Earth. So the magnetic field must be continually generated. It turns out that there is a way, through what is called the "dynamo mechanism", but two things are required: first, that the body is in rotation, and secondly, that there is convective motion of a conductive material in the rotating body. That convection is driven by heat -- in the Sun from the transport of energy generated by nuclear fusion in the center to the surface, and in the Earth from the transport of (much smaller) heat from radioactive decay of heavy elements in the center towards the surface. The conductive material in the Sun is hot ionized plasma. In the Earth it's conductive liquid metal in the Earth's outer core.
Why is the magnetic pole tilted? In fact, on average, we would expect the magnetic poles of a dynamo-produced field to line up with the rotation axis. But dynamos can be unstable: the Sun's flips every 11 years, and the Earth's, irregularly, every roughly half million years. The poles wander as parts of the magnetic field are strengthened through the dynamo mechanism faster than others.
So if you don't like the slight misalignment of the Earth's magnetic pole, just wait -- in a few thousand years it may be closer (or further) away from an alignment with the rotation axis. Over time, the average alignment will tend to coincide. But rarely will it be aligned at a given moment.
faire un petit don à science.ca.