The standard redox potential of chlorine is $E^\circ = +1.358\ \mathrm{V}$; the actual potential depends on the concentration of $\ce{Cl-}$:
$$\ce{Cl2 + 2e- <=> 2 Cl- }\quad\quad E^\circ = +1.358\ \mathrm{V}$$
$$\begin{aligned}
E&=E^\circ+\frac{RT}{2F}\cdot\ln\frac{1}{\left[\ce{Cl-}\right]^2}\\
&=1.358\ \mathrm{V}-0.05916\ \mathrm{V}\times\log{\left[\ce{Cl-}\right]}
\end{aligned}$$
The standard redox potential of oxygen is $E^\circ = +1.229\ \mathrm{V}$; the actual potential depends on $\mathrm{pH}$:
$$\ce{O2 + 4H+ + 4e- <=> 2H2O}\quad\quad E^\circ = +1.229\ \mathrm{V}$$
$$\begin{aligned}
E&=E^\circ+\frac{RT}{4F}\cdot\ln\left[\ce{H+}\right]^4\\
&= 1.229\ \mathrm{V}-0.05916\ \mathrm{V}\times\mathrm{pH}
\end{aligned}$$
The redox potentials $(E_{\ce{O2}} < E_{\ce{Cl2}})$ suggest that oxidation of $\ce{H2O}$ to $\ce{O2}$ at the anode should be preferred over oxidation of $\ce{Cl-}$ to $\ce{Cl2}$.
However, depending on the material and shape of the anode, the overpotential of oxygen at the anode can be very large. Therefore, the oxidation of $\ce{Cl-}$ to $\ce{Cl2}$ at the anode is feasible.
Nevertheless, at high $\mathrm{pH}$ and at a low concentration of $\ce{Cl-}$, the oxidation of $\ce{H2O}$ to $\ce{O2}$ is still preferred over oxidation of $\ce{Cl-}$ to $\ce{Cl2}$. Hence, if also $\ce{H2}$ and $\ce{OH-}$ are produced during the electrolysis of aqueous solutions (this is less relevant for the reduction of $\ce{Cu^2+}$ to $\ce{Cu}$ which is considered in the question, but for example important for the chloralkali process)
$$\ce{2H2O + 2e- -> H2 + 2OH-}$$
the electrolysis of chloride cannot be made complete in a single step since $\mathrm{pH}$ is increased and the concentration of $\ce{Cl-}$ is decreased during the electrolysis:
$$\ce{2 H2O + 2 Cl- -> H2 + 2 OH- + Cl2}$$