The proof: Let $\alpha= \sup X$. If $f$ is a bijective mapping of $\alpha$ onto some $\beta < \alpha$, let $\kappa \in X$ be such that $\beta < \kappa \le \alpha$. Then $|\kappa|=|\{f(\xi): \xi < \kappa\}| \le \beta$, a contradiction. Thus, $\alpha$ is a cardinal.
*An ordinal $\alpha$ is a cardinal if $|\alpha|\neq |\beta|$ for all $\beta < \alpha$.
Here's how far I think I understand the logic of the proof; first we assume $\alpha$ isn't a cardinal. This means there would be a $\beta$ less than $\alpha$ which is equinumerous to $\alpha$. We then suppose another ordinal $\kappa$ greater than $\beta$ but that injects into $\alpha$. What I don't get is how do we know that $|\kappa|=|\{f(\xi): \xi < \kappa\}|$, not to mention how $|\{f(\xi): \xi < \kappa\}| \le \beta$. If all of that stands true, then I get that we arrive at the contradiction; $\beta < \kappa$ means $\beta \in \kappa$ and that implies there can't be an injection from $\kappa$ into $\beta$ ($\kappa \le \beta$).
(I will write $X \approx Y$ to denote that $X$ and $Y$ are equinumerous.)
Note the following simple fact: If $f : X \to Y$ is a bijection, then for every $A \subseteq X$ the restriction $f \restriction A$ is a bijection between $A$ and $f''A$, which gives us that $A \approx f''A$ for all $A \subseteq X$.
In the context of the proof above, we have that $\kappa \approx f''\kappa = \{ f(\xi) : \xi \in \kappa \}$. As $f(\xi) \in \beta$ for all $\xi \in \alpha$, then surely $f''\kappa \subseteq \beta$. We thus have that $f''\kappa \subseteq \beta \subseteq \kappa$, and so by Cantor–Bernstein–Schroeder we may conclude that $f''\kappa \approx \beta \approx \kappa$. This contradicts the fact that $\kappa$ is a cardinal!
I would have proceeded slightly differently and avoided the troubling function $f$.
If $\alpha = \sup (X)$ is not a cardinal, then $|\alpha| < \alpha$ (where $|\alpha|$ denotes the unique cardinal equinumerous to $\alpha$). As $|\alpha|$ cannot be an upper bound for $X$, there is a cardinal $\kappa \in X$ such that $|\alpha| < \kappa \leq \alpha$. Note that by Cantor–Bernstein–Schroeder (as $|\alpha| \subseteq \kappa \subseteq \alpha$) it follows that $|\alpha| \approx \kappa$, contradicting that $\kappa$ is a cardinal!