😕 My is like that because MgCl2 is a compound that dissolves in water to give an electrically conducting solution and splits into ions, that is why the MgCl2 appears as Mg^2+ , those two electrons lost go to Cl, which needs two electrons to have a perfect outer shell.