I asked this on mathoverflow, but I was told to ask this here!
In the book “Conceptual Mathematics: A first introduction to categories” (first edition) on page 52 we can see the following:
Then, on page 53 we have that:
Both ‘mononorphism’ and ‘epimorphism’ are ‘cancellation’ properties.
When we are given both $f$ and $r$, and $r \circ f = 1_A$ then, of course, we can say both that $r$ is a retraction for $f$ and that $f$ is a section for $r$. For which sets $A$ and $B$ can such pairs of maps exist? As we will see more precisely later, it means roughly (for non-empty $A$) that $A$ is smaller (or equal to) in size than $B$.
I find it a bit hard to backtrack everything that is needed to know to get that $|A|≤|B|$, but I'm trying to. My understanding is that if otherwise, $|A|>|B|$, there could be two maps $x_1$ and $x_2$ from $T$ to $A$ that are different ($x_1 \neq x_2$) even though $f(x_1) = f(x_2)$. To properly imagine this, I believe that the following two examples apply:
(case $|A|>|B|$) Two male and female (sex, $T$) individuals among all people ($A$) can be different even though they live in the same country ($B$), therefore there’s no retraction for $f$. Because there are even more maps from $A$ to $B$ than the amount of maps from $T$ to $A, each single man belongs in a country at least.
(Where $|A| ≤ |B|$) Any selection of religions $x_1$ and $x_2$ (of $T$) from a country ($A$) have only one representative ($B$). Therefore, any two references of a representative of a country $f(x_1)$ and $f(x_2)$ are the same person, which matches the original selection of religions (even if only one).
Are these examples correct? Otherwise, how could they be fixed? (And can you provide better examples?).

In response to @sadasant's answer (Perhaps like a feedback). This answer clarifies that answer, and attempts to provide more clear definitions of concepts and examples. Following are my notes about your answer: