Disagree. 1-2 years is fine for your first couple of jobs. After that, though... I don't want to hire a "senior software engineer" who's only going to be there for a year. I'm not alone. You need to start staying longer than that, or you're going to find it harder to get jobs.
Isn't tenure at your current place of employment also a function of career growth, both monetary and non-monetary? IMHO, there is no point staying at a company if it "takes you for granted" even if you are performing well.
I'm sure we all have read about many companies giving new recruits substantially higher pay for the same role, creating resentment amongst the existing staff.
How do you prove to a prospective employer that you intend to stick around for a while, if you hopped around for the first few years of your career and are expecting a “Senior” promotion around year 4 or 5, which is the norm in the industry these days? Serious question