Why do alike charges repel and opposite charges attract?

Because of the electricity in the two charges. Most people think it is because of friction, but it is not.