Why is the axiom of pairing needed in Von Neumann-Godel-Bernays Set Theory? Why do we need the axiom of pairing in Von Neumann-Godel-Bernays Set Theory?
Doesn't the following prove it?

Suppose $A$ and $B$ are sets. Using the axiom of class comprehension, we can form a class $C$ such that
  $$
x \in C \iff (x = A \lor x = B)
$$

 A: Pairing does not follow from (class) comprehension: the axiom of class comprehension allows us to do the dangerous sorts of operations which initiated the study of axiomatic set theory. For example, it allows us to create the class consisting of all sets. In order to avoid contradictions, classes are not allowed to be members of things. Your derivation uses unrestricted comprehension to create a class whose elements are that of the pair $\{A, B\}$: however, comprehension does not assert that the class produced will be a set! (Consider it applied to $\{x \mid x = x \}$).
As a general comment, various printed axiomatizations of NBG or ZFC will have redundant axioms. This is for largely historical reasons: it was (and is still) of interest to study systems lacking the powerful and less intuitively clear axioms such as foundation, replacement and choice. For example, from the axiom of infinity (which is independent from the others), we get the existence of a set $S$ with at least two elements; thus, we may use replacement to show that the pair $\{A, B\}$, which can be seen as the "range" of a "function" defined on $X$, is a set.
A: NBG doesn't usually (at least as developed in e.g. Mendelson, Introduction to Mathematical Logic) contain one axiom scheme of class comprehension, but a finite set of axioms that together combine to a class existence metatheorem.
However, those class existence axioms depend on the fact that we already know that ordered pairs exist for every pair of sets, and the pairing axiom is necessary for that.
