What is surjective comparability equivalent to? By surjective comparability I mean the following principle:

"For any nonempty sets $A,B$: there exists a surjective function $f$ from $A$ to $B$ or there exists a surjective function $g$ from $B$ to $A$."


Is this statement provable in $ZF$?
If not then what exactly that principle is equivalent to (over $ZF$)?
This principle (for nonempty sets, to avoid a trivial counterexample) is equivalent to the axiom of choice. One direction is in a previous answer. For the converse, let $X$ be an arbitrary set (which I want to well-order). Apply Hartogs's theorem to get an ordinal $\alpha$ so large that it cannot be mapped one-to-one into the power set $\mathcal P(X)$. Then $X$ cannot be mapped onto $\alpha$, because if $f:X\to\alpha$ were surjective then $\alpha\to \mathcal P(X):\beta\mapsto f^{-1}(\{\beta\})$ would map $\alpha$ one-to-one into $\mathcal P(X)$. So, by your principle, there is a surjection $g:\alpha\to X$. Then $X$ can be well-ordered by setting $x\prec y$ iff the first $\beta$ with $g(\beta)=x$ is smaller than the first $\beta$ with $g(\beta)=y$.
In ZFC you can well-order any set (in fact, this is equivalent to AC over ZF). Thus you can compare cardinalities of any two sets and then you have a surjection in (at least) one direction. In general, it is impossible to do this without AC.