The former equation assumes
$$[\ce{H2A}]\simeq [\ce{A^2-}]$$
due reaction
$$\ce{ 2 HA- <=> H2A + A^2-}$$
The is possible with 2 simplifying conditions:
The concentration of oxonium resp. hydroxide ions originated from water dissociation is much lower than concentration of the basic resp. acidic ampholyte form.
$$[\ce{H2A}] \gg \sqrt{K_\mathrm{w}}$$
$$[\ce{A^2-}] \gg \sqrt{K_\mathrm{w}}$$
That assures the effect of ampholyte reaction with water dissociation products
$$\ce{ A^2- + H3O+ -> HA- + H2O}$$
$$\ce{ H2A + OH- -> HA- + H2O}$$
is negligible for the ampholyte form concentration ratios and you can ignore water dissociation.
This condition is critical for low ampholyte concentration near neutral $\mathrm{pH}$.
The concentration of oxonium resp. hydroxide ions is much lower than concentration of acidic resp. basic ampholyte forms.
$$[\ce{H2A}] \gg [\ce{H+}]$$
$$[\ce{A^2-}] \gg [\ce{OH-}]$$
That assures the effect of production of oxonium resp. hydroxide ions to reach the final $\mathrm{pH}$
$$\ce{ HA- + H2O -> A^2- + H3O+}$$
resp.
$$\ce{ HA- + H2O -> H2A + OH-}$$
does not compete with creation of acidic/basic ampholyte forms.
$$\ce{ 2 HA- + -> A^2- + H2A }$$
This condition is not valid for very low /very high target $\mathrm{pH}$, as respective ions are produced in expense of the deviation from the same ratio of ampholyte form concentration.