Due to the negative charge of the DNA, when an electric current is passed through the gel, the DNA starts moving towards the electrodes that are positively charged. The shorter DNA strands move faster as compared to the longer ones, making it easier to fragment the DNA of different lengths. This makes the negative charge of the DNA important for gel electrophoresis.