You can tell whether there exists an injective, surjective, or bijective map $A\to B$ by comparing the cardinalities of $A$ and $B$. Similarly, you can tell whether there exists an injective, surjective, or bijective linear map $U\to V$ by comparing the dimensions of $U$ and $V$ (i.e., the cardinalities of their Hamel bases).
Is there a category-theoretic explanation for this analogy? I'm inclined to consider the functor $\mathbf{Set}\to\mathbf{Vect}_k$ given by formal linear combinations on objects and linear extensions on arrows, but I'm not sure where to go from there.
I am not aware of one. The basic issue for trying to find an abstract categorical explanation is that this isn't even close to true if you replace the field $k$ by a more general ring, so you have to be using some fact specific to fields (namely that every module is free (assuming the axiom of choice)).
Generally, in any category $C$ consider the preorder on the objects of $C$ given by $x \le y$ iff there is a monomorphism from $x$ to $y$ (considering epimorphisms produces a second, analogous preorder). In $\text{Set}$ this preorder has the following special properties:
Both of these facts are quite special and specific to $\text{Set}$, and almost never hold in almost any other categories (e.g. they both fail quite badly in $\text{Top}$ or $\text{Grp}$). When they do hold (e.g. in $\text{Vect}$) they hold for specific reasons, not general categorical ones. You can see, for example, this math.SE question for a discussion of when the Cantor-Schroeder-Bernstein theorem holds in categories other than $\text{Set}$.