We compare spectra of the zonal harmonics of the large-scale magnetic field of the Sun using observation results and solar dynamo models. The main solar activity cycle as recorded in these tracers is a much more complicated phenomenon than the eigen solution of solar dynamo equations with the growth saturated by a back reaction of the dynamo-driven magnetic field on solar hydrodynamics. The nominal 11(22)-year cycle as recorded in each mode has a specific phase shift varying from cycle to cycle; the actual length of the cycle varies from one cycle to another and from tracer to tracer. Both the observation and the dynamo model show an exceptional role of the axisymmetric ℓ5 mode. Its origin seems to be readily connected with the formation and evolution of sunspots on the solar surface. The results of observations and dynamo models show a good agreement for the low ℓ1 and ℓ3 modes. The results for these modes do not differ significantly for the axisymmetric and nonaxisymmetric models. Our findings support the idea that the sources of the solar dynamo arise as a result of both the distributed dynamo processes in the bulk of the convection zone and the surface magnetic activity.