HCl is used to control the thickness of the Copper layer deposited by electroplating. HCl changes the driving force of the copper electroplating process by adjusting the concentration of copper(II) cation via an equilibrium reaction:
Cu2+ (aq) + 4Cl- (aq) <-> CuCl42- (aq)