When it smells like poop everywhere you go, look under your own shoe.
My personal take is there's not a shortage of engineers, there's a shortage of not-shit workplaces.
After awhile, most companies go from new and shiny to sticking with the same technology (it doesn't make business sense to always chase after the tech of the week) that is not where the market is going. You have three choices - either fall behind the market, learn on the side, or change companies. I choose to change companies.
Second issue is that wage stagnation is real and most companies don't do market adjustments and the meager yearly raises start getting out paced by the market. The easiest way to get a raise is by changing jobs.