system
Given the following post, respond as if you're commenting on Reddit:
human
If a meson is made of a quark and it's anti-quark, how is it that a meson is formed instead of pair annihilation occurring?
gpt
If the quark and anti-quark are of the same flavor, as in a neutral pion, electromagnetic pair annihilation does occur on a time scale of 10^-17 seconds, and the pion decays into a pair of photons.

The timescale of meson formation is much shorter than this, ~10^-24 seconds. So a neutral pion will usually stick around for a very "long" time before electromagnetic pair annihilation occurs.

Now the quark / antiquark pair can annihilate into a pair of gluons, but then those gluons still have to form hadrons (mesons or baryons). 

I think that a reasonable (and not too inaccurate) mental picture of a meson is a "bag" of quarks, antiquarks, and gluons. One can imagine gluons splitting, combining, creating quark-antiquark pairs, and those quark-antiquark pairs annihilating to make gluons. It is a big messy interesting system that really is not understood all that well.

You can think of a proton in the same way - its a messy bag of quarks, antiquarks, and gluons confined to a width of around 10^-15 m. There may be several quark and antiquark pairs of various flavors, but there is always an excess of exactly two up quarks and a down quark. So no matter how quarks-antiquark pairs are created from gluons, and no matter how many gluons convert into pairs, you can't get rid of these three extra "valence" quarks. So the proton does not decay - at least not by any well established physics.