Electrolysis also makes metals pure
For example, when reduced with Carbon, the copper produced is very impure, and doesn't conduct electricity very well.
At the cathode (negative electrode), the metal is pure.
At the anode (positive electrode), the metal is impure.