How Electron Configuration Accounts for Ion Formation