Consider a standard form optimization problem (4.1)
$$ \begin{alignat}{4} &\text{minimize}\quad &&f_0(x) \\ &\text{subject to} &&f_i(x)\le 0\quad && i=1,...,m \\ & &&h_i(x)=0 && j=1,...,p \end{alignat} $$
On page 130 of Boyd & Vandenberghe Convex Optimization, the authors outline an equivalent optimization problem transformation via "change of variables".
Suppose $\phi:\mathbb R^n\to\mathbb R^n$ is one-to-one, with image covering the problem domain $\mathcal D$, i.e., $\phi(\textbf{dom }\phi)\supseteq\mathcal D$. We define the functions $\tilde f_i$ and $\tilde h_i$ as $$ \tilde f_i(z)=f_i(\phi(z)),\quad i=0,...,m,\quad \tilde h_i(z)=h_i(\phi(z)),\quad i=1,...,p. $$ Now consider the problem (4.4) $$ \begin{alignat}{4} &\text{minimize}\quad &&\tilde f_0(z) \\ &\text{subject to} &&\tilde f_i(z)\le 0\quad && i=1,...,m \\ & &&\tilde h_i(z)=0 && j=1,...,p. \end{alignat} $$ The two problems ((4.1) and (4.4)) are clearly equivalent: if $x$ solves (4.1), then $z=\phi^{-1}(x)$ soles (4.4); if $z$ solves (4.4), then $x=\phi(z)$ solves (4.1).
I'd like to focus on the "one-to-one" requirement. I don't see why it's there. On page 132, a particular change of variables is used for "eliminating equality constraints":
Suppose the function $\phi:\mathbb R^k\to\mathbb R^n$ is such that $x$ satisfies $h_i(x)=0$ $i=1,...,p$ if and only if there is some $z\in\mathbb R^k$ such that $x=\phi(z)$. The optimization problem $$ \begin{alignat}{4} &\text{minimize}\quad &&\tilde f_0(z)=f_0(\phi(z)) \\ &\text{subject to} &&\tilde f_i(z)=f_i(\phi(z))\le 0\quad && i=1,...,m \end{alignat} $$ is then equivalent to the original problem (4.1) [...] If $z$ is optimal for the transformed, then $x=\phi(z)$ is optimal for the original problem. Conversely, if $x$ is optimal for the original problem, then (since $x$ is feasible) there is at least one $z$ such that $x=\phi(z)$. Any such $z$ is optimal for the transformed problem.
The case of "change of variables" requires $\phi$ to be one-to-one yet "eliminating equality constraints" makes no such requirement. Why?
Note: if you are going to answer "because otherwise $\phi^{-1}$ does not exist, so we cannot do $x=\phi^{-1}(z)$ in the change of variables case", my counter-argument would be that this does not stop the authors for the eliminating equality constraints case. They say simply pick one $z$ such that $x=\phi(z)$ and we can do the same in the change of variables case.