Cations should equal anions for electrical neutrality, we have an anion gap since we're not measuring every single charged particle in the body. Consider:
Na + unmeasured cations (UC) = Cl + HCO3 + unmeasured anions (UA)
which would be
Na - (Cl + HCO3) = UA - UC
Measuring the left side of the equation gives us the answer to UA - UC, which is the anion gap and should normally be under 12, since there are more anions, as opposed to cations, that we don't measure. Big examples would be albumin, citrate, phosphate. So, eg, you'd have to adjust the AG downwards in hypoalbuminemia.
When you get MA due to losing HCO3 (eg RTA), the body replaces it with Cl. Fit this idea into the equation above, and you'll see the measured anion gap will stay normal.
When you get MA due to addition of an acid, you end up with an increase in the AG. Consider the body generating an excess of lactic acid, which dissociates to release H ions. This gets buffered by HCO3, which decreases and we end up with MA. However, the loss of the negative bicarbonate is balanced by the presence of the negatively charged conjugate base from lactic acid. Hence theres no need to increase Cl. Of the values measured in the equation above, HCO3 will decrease, and nothing else. Hence the measured AG increases.
To summarize,
normal AG = due to loss of HCO3
increased AG = due to addition of acid