* great pay
* great challenges
And in all honesty, I'd say that the former isn't as motivating as you'd think. I've had jobs where I make "plenty enough" money and have quit because I've not been challenged.
In fact, in one in particular I tried to make my own challenges- throwing together concepts and forwarding them to my managers, only to be shot down. Then watch our competitors do exactly what I proposed a few months later. It's demoralising and it made me realise that, as a company, we'd always be on the back foot. I'd never be proud of what I made, and "plenty enough" doesn't make up for that.
So a number of my ideas weren't actually flat out rejected, but they weren't a priority- we already had a list of features to implement. Of course, by the time we implemented those features, the number one had moved on and implemented the stuff I'd originally proposed. Such a frustrating process, and a 100% guarantee that you'll never be the number one company.
Makes me glad I develop as a hobby, not as a career.
It seems like at most companies, developers have a shelf-life before you are too experienced to hire or are expected to move into management. I don't know that anyone should fault people for taking full advantage of their earning potential while they can.
When your company fails to give you something interesting to work on, welp, that's how things will go down. If I wanted to make big bucks being a soulless drone I'd see who was hiring for sales or quants.
I work on your legacy applications, but you pay me new development wages, generally below what I can get elsewhere. You don't challenge me enough, so I end up watching cat videos to spend time between bursts of getting things done, because there's just not enough actual work to be done. When I come to you with problems, you talk about how you'll get some people together to look into it; I've never heard back.
When Google contacts me, they treat me like a human that wants to grow, learn, and expand beyond the walls of the company, not just inside it. I don't want to play politics. I want to build cool stuff, make money, and learn something new every day. You don't give me that, so I'm leaving.