When the Naive B cell gets activated and begins to secrete antibodies the affinity of the antibodies is low, as it hasn't yet gone through several cycles of affinity maturation. The increased avidity of the IgM balances the decreased affinity of these initial antibodies. If IgG were released at this stage, the body would have a much lower immune reaction to the antigen.
However after affinity maturation, the IgG has sufficient avidity and affinity to mount a stronger immune reaction than the initial IgM antibodies. If the body still produced IgM after affinity maturation, there would likely be a significant amount of crosslinking. This could potentially cause aggregates to form in the blood/lymph which could cause occlusions.
If the affinity of the antigen-binding sites in an IgG and an IgM molecule is the same, the IgM molecule (with 10 binding sites) will have a much greater avidity for a multivalent antigen than an IgG molecule (which has two binding sites). This difference in avidity, often 10^4-fold or more, is important because antibodies produced early in an immune response usually have much lower affinities than those produced later. Because of its high total avidity, IgM—the major Ig class produced early in immune responses—can function effectively even when each of its binding sites has only a low affinity.
Molecular Biology of the Cell
The claim on aggregation after affinity maturation is speculation based on the crosslinking that occurs with IgA antibodies (e.g. Phlegm) when there are only two high-affinity Ig molecules joined together rather than five.