Here's why:
* Like charges repel: This is one of the fundamental principles of electromagnetism.
* Opposite charges attract: This is the other half of the principle.
Think of it like magnets: North poles repel each other, and so do south poles. But a north pole will attract a south pole. The same concept applies to electrical charges.