Why does inertia happen?

Similar questions are: "why does electric charge happen?" and "why does gravity happen?" etc.

The "art" of physics is in the identification of the fundamental "stuff", stuff for which the question "why" is actually misguided.

You see, if there are fundamental "things" then, by the definition of "fundamental", these are the givens that we accept without question. For, if these fundamental things can be explained, they aren't fundamental.

Now, a reasonable question is this: is inertia fundamental?.

I don't know.

A way to see that is Noether theorem, which states that, if a system has a continuous symmetry property, then there are corresponding quantities whose values are conserved in time.

More precisely, consider a Lagrangian of a particle, moving in one dimension $x$, subject to a constant force $F$:

$$L = \frac{1}{2} m \dot x^2 + Fx$$

Imagine now the transformation $x \rightarrow x + a$, where $a$ is a constant

You see that $L$ transform as $L \rightarrow L + Fa$

So, if $F = 0$, the Lagrangian is invariant by the transformation $x \rightarrow x + a$, so this transformation is a continuous symmetry for the Lagrangian, and then there is a conserved quantity in time, which is simply the momentum $p = m \dot x$. You have $\dot p = 0$

If $F \neq 0$, the transformation $x \rightarrow x + a$ is no more a symmetry for the Lagrangian, and the momentum $p$ is no more conserved, and you have $\dot p = F$