TITLE: Taimanov's extension theorem [collecting applications]
QUESTION [6 upvotes]: In a topology course we proved the following theorem:

Let $X$ be any space, $D \subseteq X$ dense, $Y$ a compact $T_3$ space and $f: D \to Y$ be any continuous map, s.t. for all disjoint closed $A, B \subseteq Y$: $\overline{f^{-1}(A)} \cap \overline{f^{-1}(B)} = \emptyset$ holds (the closure regards to $X$). Then there is a continuous extension of $f$ to $X$.

This theorem seems quite powerful to me, because its proof involves many filter/ultrafilter computations, but nevertheless I don't know a single application. Can you name some to me?
Thank you in advance!
//edit:
@Henno Brandsma, Paulo H.: thank you for your really interesting answers!
I still wonder, whether there are further applications outside general topology (e.g. analysis, measure theory). Are there particular functions which become surprisingly easy to define using this theorem (note that there is a unique extension, if $Y$ is additionally Hausdorff)?

REPLY [2 votes]: There is another applications of this theorem. It is also in Engelking's General Topology, enumerated as Theorem 3.5.5: 
Compactification $c_1 X$ and $c_2 X$ of a space $X$ are equivalent if, and only if, for every pair of closed subsets $A,B\subseteq X$ we have
$$ \Big( \overline{c_1[A]}\cap\overline{c_1[B]} = \emptyset \Big)\leftrightarrow \Big (\overline{c_2[A]}\cap\overline{c_2[B]} = \emptyset \Big)$$
The proof is based on the map $h_i: c_i [X]\to X$ given by the restriction $c_i|_X$, for $i\in\{ 1,2\}$. As $c_i[X]$ is dense in the compactification $c_i X$, there is extensions $C_2:c_2X\to c_1X$ and $C_1:c_1X\to c_2X$ of the functions $c_1h_2: c_2[X]\to c_1 X$ and $c_2h_1:c_1[X]\to c_2 X$, such that $C_2\circ c_2 = c_1$ and $C_1\circ c_1 = c_2$.
Also, the reciprocal of Taimanov's theorem is true.