This is because positive ions lose electrons of the outermost shell so they have one less shell than the neutral atom while negative ions gain electrons in the outermost shell.Let me give an example,Chlorine has 17 electrons in the electronic configuration-2,8,7 so it gains an electron and becomes stable with 3 complete shells while Sodium which has 11 electrons in the electronic configuration-2,8,1 loses an electron and becomes stable with two shells.