Why do these topological defects occur in the first place?
They do not occur.
There has been no experimental detection of magnetic monopole to date, so there is experiment/theory discrepancy that needs to be fixed by incorporating magnetic monopoles in the current framework.
Physics is ultimately driven by experimental findings, which have not (yet?) found monopoles, hence why I say "They do not occur". As Feynman said:
It doesn't matter how beautiful your theory is, it doesn't matter how
smart you are. If it doesn't agree with experiment, it's wrong
So. Where does the "magnetic monopole discourse" come from?
In the interest of keeping the maths to an undergraduate level, as per your request, I'll avoid proofs and just state the results. I think the maths is quite accessible in this review (already mentioned in the comments to the question) by my old lecturer Arttu Rajantie (fun trivia).
A few physics theories would look more elegant and symmetrical, and would provide a theoretical proof to facts e.g. electric charge quantisation (that is indeed observed to be true in the real world), were magnetic monopoles to exist:
1) Classical electrodynamics would have a ("beautiful") duality symmetry between electric and magnetic fields:
- In the same way as electric field lines start and end on electric charges $q$, magnetic field lines would start and end on magnetic charges $g$.
- Maxwell's equations would remain unchanged under the transformation $\mathbf{E}\rightarrow \mathbf{B}$ and $\mathbf{B}\rightarrow -\mathbf{E}.$
- The Lorentz force for an electric (magnetic) charge moving in an EM field would also obey the aforementioned symmetry:
$$ \mathbf{F}_{\text{on q}} = q(\mathbf{E}+\mathbf{v}\times \mathbf{B}) \quad \text{and} \quad \mathbf{F}_{\text{on g}} = g(\mathbf{B}-\mathbf{v}\times \mathbf{E}) $$
- The electric field and magnetic field from a point charge would look exactly the same:
$$ \mathbf{E} = q\frac{\hat{\mathbf{r}}}{r^2} \quad \text{and} \quad \mathbf{B} = g\frac{\hat{\mathbf{r}}}{r^2}.$$
In short, classical electrodynamics would be perfectly compatible with this duality symmetry, the absence of which thus "suggests" it to be "broken".
2) Magnetic monopoles in quantum mechanics would lead to a theoretical requirement for electric charge quantisation.
This is known as the Dirac quantisation condition and it is indeed a bit subtle and I refer you the review for the full story. But in the interest of keeping it to undergrad level: if you were to perform a double slit experiment with electrons you'd get an interference pattern whose spatial profile is governed by the phase acquired by the electron's wavefunction between the slit and the screen. If you were now to place a source of magnetic flux (e.g. a solenoid or this usefully engineered thing called a Dirac string) just before the slits, it would cause the electrons to pick up an extra phase $\Delta \theta$ (image):
This has actually already been observed in the Aharnov-Bohm effect and this phase is given by:
$$ \Delta\theta = q \oint_C \mathbf{A}\cdot \mathrm{d}\mathbf{r}, $$
where $C$ is the closed contour in the image: source $\rightarrow$ screen $\rightarrow$ back to source.
Now, if the magnetic vector potential $\mathbf{A}$ were to be caused by a magnetic monopole, then it would have a $g$ in it (see classical expression for point magnetic charge field above), which means that $\Delta \theta \propto q\cdot g$. But a phase in quantum mechanics in only meaningful modulo $2\pi$, which leads to:
$$ \frac{qg}{2\pi} \in \mathbb{Z}, $$
i.e. the Dirac quantisation condition which says that, if magnetic monopole charges g were to exist, then the electric charge $q$ would be quantised. This is enticing because it is indeed observed to be true in nature, all electric charges are integer multiples of $\pm e/3$, the charge of quarks.
3) Magnetic monopoles came up as a by-product of alternative electro-weak and Grand-Unification theories (GUT)
The maths of the electroweak symmetry breaking through the Higgs mechanism is not exactly undergrad, but suffice to say some people had found that electromagnetism and the weak interaction could be described under a unified framework if one were to assume a particular group symmetry ($SU(2)_L \times U(1)_Y$) and the existence of another field called the Higgs field. A phase transition occurring when the early universe was cooling down, then, "broke" this symmetry and gave us the separate electromagnetism and weak interaction that we experience today.
Turns out some other people had a similar theory with a different group symmetry (first $SO(3)$, then $SU(5)$). These theories also had a (or two) Higgs field, which was a 3D vector field. The same phase transition mentioned above would break the 3D symmetry and force it to "pick a direction". Long story short, there is a configuration where a direction has been "picked" but it is not homogeneous, known as the hedgehog configuration, or a 't Hooft-Polyakov monopole solution:
(aside: since this thing cannot be continuously deformed to something flat, it is referred to as a topological defect)
One can calculate the magnetic field of this configuration (the 1974 't Hooft paper), and it comes out to be the field of a magnetic monopole with a magnetic charge $g = \frac{4\pi}{q}$.
Since you specifically asked
Why must these defects/particles carry a magnetic charge?
I am assuming the "turns out" argument does not satisfy you.
The reason for this is that electromagnetism corresponds to a $U(1)$ group symmetry, which is just a circle of radius $1$ in the complex Argand diagram. There is an obvious symmetry about the z axis, the axis through the centre of the circle. So electromagnetism and hence electric and magnetic fields are related to the rotation around this axis. In this theory, the axis is the Higgs field vector direction after symmetry breaking (i.e. the direction that has been "picked).
--
The mass of this particle was first theorised to be $100$ GeV (in the $SO(3)$ theory) and then $10^{15}$ GeV (in the $SU(5)$). The latter theory would also introduce a channel for proton decay. Neither the particles not proton decay has been observed (yet).
What about cosmology and early universe?
I see you mention "early universe" in the title, and used the "cosmology" tag.
If magnetic monopoles were allowed to exist by the fundamental laws of physics, then there is a chance they were created along with everything else in the Big Bang or shortly afterwards in the early universe. So, one should be able to find them. Needless to say, no one has found one (yet).
Indeed this is known as the monopole problem.
And indeed there are multiple theories attempting to explain this apparent the lack of monopoles (other than "they don't exist" that is), including (cosmic) inflation that would have stretched spacetime so much in such a short time, that it would have scattered the already scarse magnetic monopole reservoir to an extremely dilute density, making it very unlikely for them to be detected. I added this last paragraph because you had the 'space expansion' tag, which I removed in favour of the 'electromagnetism' tag because I felt you had to have this one, and 'cosmology' already covered the "space" stuff.