Let $M$ be a compact metric space and $f: M \rightarrow M$ be a quotient map.
Consider the following equivalent relation $\sim$ such that $x_1\sim x_2 \Leftrightarrow f(x_1)=f(x_2)$ for a given quotient map $f$.
We know that $f$ is closed map. Hence, there exists a homeomorphism $\tilde{f}:M/\sim \rightarrow M$ by $\tilde{f}([x])=f(x)$, where $[x]=\{x' \mid f(x)=f(x')\}$ is equivalence class.
Now I am curious about this part.
Can we define a continuous function $\alpha:M/\sim \rightarrow M$ such that $\alpha([x])=x' \in [x]$ ?
If $[x]$ has at least two elements then $\alpha([x])=x'\in[x]$ would depend on the choice of $x'$. In other words $\alpha$ is not well defined in general.
But the definition $\tilde f([x]) = f(x')$ for $x'\in[x]$ is correct. It doesn't depend on the choice of $x'\in[x]$, because for any $x_1, x_2\in[x]$ we have $f(x_1)=f(x_2)$ by the definition of $\sim$.
The question about the continuity of $\tilde f$ is a whole different story though and requires a proof. But it's a more general fact:
Note that $X, Y$ don't have to be compact, metric or equal and $f$ does not have to be closed.