In $\mathrm{NBG}$, one can construct a model of $\mathrm{ZFC}$: $V$, the class containing every set. Thus:
- $\mathrm{NBG}$ can prove "$\mathrm{ZFC}$ is consistent".
Furthermore, the following theorem holds:
- $\mathrm{NBG}$ can prove the theorem "$\mathrm{ZFC}$ is consistent if and only if $\mathrm{NBG}$ is consistent".
So, because of 1. and 2.: $\mathrm{NBG}$ can prove "$\mathrm{NBG}$ is consistent". But this is a contradiction to Gödels second incompleteness theorem. Can you find my fault?
The fault is in the first statement.
While the class of all sets is indeed an object in a model of $\sf NBG$, the definition of a truth predicate for it requires impredicative comprehension, which is not something you have in $\sf NBG$. Therefore $\sf NBG$ proves that each axiom of $\sf ZFC$ holds in $V$, individually, but not that $\sf ZFC$ holds in $V$.
It's not just that, it's also the fact that the axioms satisfied by the class $V$ are the meta-theory's axioms of $\sf ZFC$. If $V$ has non-standard integers, it will have more internal axioms to $\sf ZFC$. Since you cannot quantify over the axioms of the meta-theory inside the theory, satisfying each axiom individually will not tell you that you satisfy all the axioms uniformly.
If you add impredicative comprehension back, you get $\sf KM$ (Kelley-Morse set theory) which is indeed stronger than $\sf ZFC$ and proves its consistency.
We can see the same thing happening with Feferman's extension of $\sf ZFC$, and there perhaps the argument will be clearer.
Augment the language of set theory with a constant $M$ and add to $\sf ZFC$ the following axioms: $M$ is a countable transitive set, and the schema $\varphi\leftrightarrow\varphi^M$ (where $\varphi^M$ is the relativization of $\varphi$ to $M$).
So essentially the theory is $\sf ZFC$+"There is a countable transitive elementary submodel of $V$". Certainly this theory should be capable proving that there is a model of $\sf ZFC$ and therefore its consistency.
But the truth is that this is equiconsistent with $\sf ZFC$. Why? Given a universe of $\sf ZFC$, the reflection theorem tells us that each finite set of statement true in the universe, are true in some $V_\theta$, so they have a countable transitive model.
Compactness applied in the meta-theory gives us now that Feferman's theory is equiconsistent with $\sf ZFC$ itself. But it also gives us a universe which is not necessarily "standard" and might disagree with the meta-theory about the integers (and therefore about what $\sf ZFC$ means internally).
So while externally we know that $M$ satisfies all the axioms of $\sf ZFC$ (and more!), internally we cannot prove that it really satisfies all the axioms of $\sf ZFC$, just a "finite fragment" (here finite happens to be internally-finite, and not a meta-finite either).