During the 2008 recession I've seen people who were with a company for 20 years get laid off. At the end of the day, most people are signing an "at-will" employment agreement. Which means the risk is the same weather you move frequently or stay in place for a long time.