The answer is because like electric charges do not attract with each other. Ions either lack or have excess electrons in their atomic structure. Ions with a positive charge are called cations. They lack electrons in their atoms so they have to pair up with negatively charged ions, called anions, because they have excess electrons. Together, they form a compound that is neutral.