Ultimately, the resume is a very weak form of recommendation for or against any particular individual, in my opinion. I've seen people with very strong resumes who couldn't code their way out of a paper bag. I've seen people with patchy or "weird" resumes, no CS degree, sometimes no college degree whatsoever who were top tier developers worth their weight in gold. Your screening and interview process needs to be good enough to be able to provide a reasonably trustworthy result even without a resume, if it's not then it's a failure. If it is, then it's comparably easy to make a decision on someone with lots of short stints.
Also, I find this whole discussion a bit odd in a couple ways. For a lot of big companies (like Amazon and Google) the average tenure is only about 1 year, and people here are drawing attention to 1 year as some sort of red flag duration, when in reality it's super common for a lot of devs at a lot of companies. Another is that I don't see people being concerned about overly long periods of employment at the same place. To me that's potentially a red flag too because it might indicate someone doesn't have the sort of job prospects necessary to get hired elsewhere. Though, again, you do need to always rely first and foremost on the in person interview.
Someone's resume might raise questions but it's unprofessional to fill those questions in with prejudices, you need to answer those questions with data from phone screens, homework assignments, in person interviews, etc.
There are plenty of folks out there who are even less lucky than I was. Folks who were lured into a shitty job early in their career before they had the experience to know better. Folks who just got unlucky and ended up working at places that seemed fine from the outside but were hell holes on the inside, or turned into hell holes due to mismanagement or reorgs or culture shift or what-have-you. Those people shouldn't be punished for making the rational choice to go somewhere else.
Additionally, people don't usually work just for a specific company, they work on a team as part of an org within a company. And sometimes changes in a company mean that teams get changed or eliminated. That can happen for a lot of reasons independent of the quality of the work of the team, but when it does it can often put people in a tough spot, in the best case they will have to go on a job hunt internally, but often times (especially in hot tech markets like SV) if one is doing that it makes sense to also cast a net outside the company as well.
Asking people to spend 2-3 years at a company without any knowledge of what the conditions were like there or the reasons for someone to switch jobs is pretty silly. In fact it could be an indication of a lower quality employee. When conditions go south the people who have the highest intrinsic motivation to do good work and the people with the best skillsets are precisely the ones who are more motivated to leave and can more easily find a new job. People who just cash paychecks and have mediocre skills are going to hang on to whatever job they have for as long as they can.
Additionally, if a company is worrying excessively about holding on to employees, worried that they might be "too flighty" or what-have-you, that is kind of a red flag for me. If they don't have the confidence that they can convince someone to stick around then maybe they are expressing a subconscious judgment of the poor working conditions (or lack luster compensation) there.