Why are the axiom of specification is an axiom schema? Why not just a single axiom? So I was reading about the ZFC axioms, and apparently some of them are actually "axiom schemas." For example, there is the "axiom schema of specification," which basically says that give a set $A$ and a formula $\phi(x)$, a subset of $A$ exists where all the elements satisfy $\phi(x)$.
This is apparently not one axiom, but a schema of infinitely many axioms, because there is one axiom for every $\phi(x)$. So that must mean that for whatever reason, just letting $\phi(x)$ be an arbitrary formula does not make a valid axiom. So are there rules for what an axiom can say? 
So my questions are: Why is this not allowed to be one axiom? What are the rules for what an axiom is allowed to be? And why?
 A: In ZF, all expressions must ultimately be a syntactically valid, finite combination of variable names, the $\forall$ quantifier, parentheses, the logical operations $\lnot$ and $\lor$, $=$ and finally $\in$. That's it.
Of course, in practice we have a lot of other symbols, like $\subseteq$ and $\exists$, but technically they are all defined as specific shorthands for combinations of the symbols above.
There is no way to use these to say $\forall \phi(\phi\text{ is a formula}\to\ldots)$, the way one might want to do to make the axiom schema into actual axioms.
A: Noah Schweber pointed out that there is a tension between expressiveness of a logic and having a nice proof theory. There is another tension, between expressiveness and inconsistency.  
More expressive logical systems were developed in the early 1930s by Church (a form of $\lambda$ calculus) and separately by Curry (a form of combinatory logic, essentially a different kind of $\lambda$ calculus).   These logics were more expressive in the sense that they could refer to their own formulas more directly than in first-order logic, essentially by allowing variables to refer to terms or formulas. 
Unfortunately, both of these systems were shown to be inconsistent by Kleene and Rosser in a joint paper in 1935. (Church had already tried to modify his system to avoid inconsistency, but they showed his revised system was inconsistent as well as Curry's system of the time.)  More information is available in the article "Paradoxes and Contemporary Logic" by Andrea Cantini and Riccardo Bruni in the Stanford Encyclopedia of Philosophy.  (Recall that other, earlier logics systems that tried to be very strong, such as Russell's original system for Principia Mathematica, were also found to be inconsistent.) 
After the inconsistencies were found, Church and Curry both turned their attention to weaker systems, including the simply typed $\lambda$ calculus developed by Church.  The inconsistent systems slipped into history, but they are still important examples on the limits to what can be put into a logic. 
We now realize that there is a limit on how much a logic can refer to itself.  Variations of Richard's paradox and Curry's paradox arise easily with too much self-reference. In a sense, first-order logic and theories such as Peano Arithmetic and ZFC stay just inside this limit. The result is that PA and ZFC are consistent but are subject to Gödel's incompleteness theorems. Adding just slightly more self-reference - which seems to be very hard to avoid in systems that can quantify over and manipulate their own formulas - tends to create systems that are inconsistent or where some terms are undefined or some formulas have undefined truth values.  You can't have it all in a consistent logic. 
First-order logic avoids all of this by having no direct way for formulas or terms to refer to or quantify over other formulas or terms. We don't have to worry about undefined terms or undefined truth values, and the logic itself is consistent. A side effect is that infinite lists of formulas sometimes have to be included as infinite lists of axioms, rather than as a single axiom that quantifies over the formulas. This is usually viewed as an acceptable cost, given the other nice properties of the logic. 
A: This is just the choice of underlying logic. ZFC is a theory in first-order logic, and the strictures of that logical system rule out certain kinds of expressions. There are other logics, and their study comprises abstract model theory.
Very roughly, there are two competing hopes for a logical system:

*

*It should be expressive: things we intuitively want to be able to say, should be say-able in the system.


*It should be not too wild: e.g. there should be a well-behaved notion of proof.
It turns out that these are fundamentally in tension. For example, if we want proofs to be finite, then our logical system can't capture infinite structures up to isomorphism (this is the compactness theorem, essentially).
So why did we pick first-order logic after all, given that it forces us to use axiom schemata (and other inefficiencies)? Well, first-order logic seems to sit at a sweet spot here: it's fairly expressive, but also has a very well-behaved notion of proof and a more technical property called the "Lowenheim-Skolem property" which roughly says that it doesn't interact too much with set theory (indeed, it's the most expressive logic with these properties - this is due to Lindstrom).
This paper of Ferreiros may be of interest with regard to how first-order logic emerged as "the" primary logic of mathematics: Jose Ferreiros: The Road to Modern Logic - An Interpretation, The Bulletin of Symbolic Logic, Vol. 7, No. 4 (Dec., 2001), pp. 441-484. Author's website, ASL, JSTOR, DOI: 10.2307/2687794.
A: The other answers have explained that these axiom schemas of ZFC have to be schemas and not axioms, because we want ZFC to be a first-order theory. The reasoning is that we need to quantify over all formulae over ZFC. In particular, the Specification schema of ZFC can be stated as:

For each $(k+1)$-parameter sentence $φ$, ZFC has the axiom: 

$∀p[1..k]\ ∀A\ ∃B\ ∀x\ ( x∈B ⇔ x∈A ∧ φ(p[1..k],x) )$.


Notice that we cannot have a single axiom that quantifies over all parametrized sentences (over the theory itself), because that is not (directly) expressible in first-order logic. In fact, it can be shown that ZFC cannot be finitely axiomatized (using the same language).
But that is not quite the full story. There is a general procedure to convert any sufficiently nice first-order theory $T$ into another first-order theory $T'$ (with a different language) that interprets $T$ and yet is finitely axiomatized. Doing this to PA yields a well-known second-order theory called ACA0, and doing this to ZFC yields almost NBG.
The basic idea to use two sorts, one sort $I$ for the original domain of $T$, and the other sort $J$ for 'classes', where each class is a subcollection of $I$ that represents some predicate over $T$. (For this, we need $T$ to support some reasonable ordered-pair encoding.) We then axiomatize the existence of the class of all objects in $I$, namely $∃C∈J\ ∀x∈I\ ( x∈C )$, which for convenience we shall state as existence of the class $\{ x : x∈I \}$. We also axiomatize the existence of the class $\{ (x,x) : x∈I \}$ to capture equality, and the existence of a class to capture each predicate/function-symbol of $T$. For example, to capture "$∈$" of ZFC we would have the class $\{ (x,y) : x,y∈I ∧ x∈y \}$. We also axiomatize existence of the singleton class $\{x\}$ for any $x∈I$, and that classes are closed under complement, union, intersection, cartesian product and projection.
If $T$ had finitely many predicate/function symbols, then the above axioms are finitely many, and yet allow us to construct any definable class of tuples over $T$, namely $\{ x[1..k] : φ(x[1..k]) \}$ for any $k$-parameter sentence $φ$ over $T$, as a member of $J$. Furthermore, every class that we can explicitly construct corresponds to some parametrized sentence over $T$. Thus we can now express any axiom schema of $T$ that quantifies over all parametrized sentences over $T$ as a single axiom quantifying over all members of $J$, and can prove that the resulting theory $T'$ is conservative over $T$ in the specific sense that every sentence over $T$ is provable by $T$ iff its translation (i.e. restricting every quantifier to $I$) is provable by $T'$.
Since any many-sorted first-order theory can be easily interpreted by a one-sorted first-order theory (i.e. replacing the sorts by predicate-symbols), it is inconsequential that we used two sorts in $T'$.
Quite apart from the finite axiomatizability of NBG, some set theorists prefer to say that they are working in NBG rather than ZFC, since it intrinsically allows definition and quantification over classes. But if one wants to be able to define a class whose defining formula involves quantifying over classes (like one can in ZFC define a set whose defining formula can quantify over sets), then the result (MK) is again is no longer finitely axiomatizable (in the language of NBG), because you would need an axiom schema for Specification of classes.
