Yes and no - if you lose your job at Apple, you can go down the street to Microsoft. If you lose your elected government job, you can't run again for years. Meaning, you have to switch from being a government employee back to being a commercial employee.
If you lose you elected government job and you still need to work, you become a lobbyist.