I was reading A Walk Through Combinatorics: An Introduction to Enumeration And Graph Theory (Miklós Bóna) and came across a definition for bijection:
Let $X$ and $Y$ be two finite sets, and let $f : X \rightarrow Y$ be a function so that
(1) if $f(a) = f(b)$, then $a = b$, and
(2) for all $y \in Y$, there is an $x \in X$ so that $f(x) = y$,
then we say that $f$ is a bijection from $X$ onto $Y$.
I see that (1) prevents the case of mapping multiple elements in $X$ to the same element in $Y$. Though, unless I'm missing something here (2) seems to say to me that each element in $Y$ must be mapped by something in $X$. What I'm not seeing here is what about unmapped (unused) elements in $X$? I saw some sources saying bijections cannot include those scenarios but I'm not sure if this definition is wrong or if my understanding of it is flawed.
E.g., how would this mapping that I drew below violate the definition above where I create an element in $X$ that is not mapped to $Y$?