The universal introduction rule

$\displaystyle \frac{P(x)}{\forall x\,P(x)}$

requires that x in the premise is a free variable. (In addition, it must not be free in any open assumption of P(x).) In your derivation, $\displaystyle a$ is a constant, so you can't apply this rule to derive $\displaystyle \forall x\, P(x)$.

On the other hand, $\displaystyle \neg\exists x\,\neg P(x)$ and $\displaystyle \neg P(a)$ are inconsistent and therefore do imply any formula, including $\displaystyle \forall x\,P(x)$: one can conclude any formula directly from $\displaystyle \bot$, which is obtained from $\displaystyle \neg\exists x\neg P(x)$ and $\displaystyle \exists x\neg P(x)$. However, that arbitrary conclusion would still have an open assumption $\displaystyle \neg P(a)$. In contrast, the proof above takes care to close the temporary assumption $\displaystyle \neg P(x)$.