Why can a set only contain sets? I just got a bit into set theory and I am not sure if I understood it right that in the NBG set theory we just assume that sets can only contain sets. So basically the "every set is a class" just follows from this assumption, right? I just see this "every set is a class" statement everywhere, but I have not seen an explanation or a proof for this and thats why I am wondering.
 A: Yes, every set is a class (but not the other way around). It’s true that only sets are elements of sets, but we can say more: only sets can be elements of classes.
How this is precisely arranged for in the formal system depends on the details... more often than not, it’s true by definition. For instance, in one common treatment of NBG, the only kind of object is a class, and then “$x$ is a set” is a predicate we just define as $\exists y\; x\in y$. So just based on the definitions, we have that every set is a class and that only sets are elements of classes.
Another approach is to have two sorts, one for classes and one for sets (will use capital letters for classes and lower case for sets). Our relation $\in$ will relate sets to classes and sets to sets, but not classes to sets or classes to classes, e.g. $x\in Y$ is syntactically correct, but not $X\in Y.$ (This isn't the only way to enforce this.) Then we can prove something like $$\forall x\exists Y \forall z (z\in Y\iff z\in x).$$ This is an immediate consequence of the class comprehension scheme, which says for any formula $\phi(z)$ with no class quantifiers (but possibly set and class parameters), $$ \exists Y\forall z(z\in Y\iff \varphi(z)),$$ where we take $\phi(z)$ to be the formula $z\in x.$
In ZFC, where there are only sets and no classes, formally speaking, a class is an informal notion of the collection of all objects satisfying some formula (with set parameters) $\phi(z).$ (So $z\in C$ is just shorthand for $\phi(z)$, where $\phi$ is the formula corresponding to $C.$) So then, for any set $x,$ we just take $\phi(z)$ to be the formula $z\in x$ and then this formula represents the class that is "equal to" the set $x.$
So regardless, the notion that a set "is" a class is pretty much baked in. And it should be, since conceptually, classes are supposed to be collections that are too big to be sets. Set theory is about treating collections as first class objects that can themselves be collected according to their properties. But due to the paradoxes, some collections can't be consistently manipulated like this. So a class is some collection that can't be collected in this manner, whereas a set is one that can. In other words, a set is a special kind of class that can be a member of a class.
