I have 8 YoE and have worked at 4 places (excluding an internship), 5 if you count a longer-term moonlighting role. We'll just say 4. You'd probably still find this to be "bad", it's about 2 years per role. I would say though that I am often poached (e.g. I'm not actively looking but someone wants me bad enough to pay me a lot more than I am currently making). The moonlighting thing was kind of a poach. They wanted to hire me full-time but then COVID hit.. but I had already resigned from my current job in anticipation (I wanted a break between the two roles). My current job was a poach. I was poached from my internship-turned job. I don't go looking for a new job typically, but what am I supposed to do when someone offers me a 30-50% pay bump? Say no because that might make it harder for me to find a job down the line? That's kind of a paradox, no? If I refuse the guaranteed higher-paying role, I may still not get a particular role down the line, perhaps for a reason other than my "job hopping".

I agree that job-hopping is a YELLOW flag that interviewers should prod on a bit, but ultimately the reason that I "job hop" is that whoever my current employer is, can't remotely compete with this unsolicited job offer I have received.

More details for anyone curious:

When I was a sophomore in college, a recruiter reached out to me on LinkedIn asking if I was interested in an internship at a startup. I accepted because I needed the money to pay for college, and internships = good yadda yadda. Paid me $14.50/hour and I was full-time in the summer, part-time (20 hours) during school.

In that fall semester, after being at this startup for around 8 months, I gave a presentation for a class, where the class broke up into teams and each worked with a local company for a web-related project. The day my team presented happened to also be the day the Allstate team presented, so people from Allstate were in the audience during my presentation. They were impressed and offered me a job basically on the spot. I resisted, partially feeling guilty about leaving the internship that gave me a chance and kicked off my career. Ultimately though, the startup failed to deliver on promises of one-on-one mentorship and getting to work in certain technologies like ElasticSearch, which at the time was the "new hotness". The pay, which was $16/hour now, was competitive (at the time), and I figured if I asked Allstate for a stupid amount of money, they would say "no" and I could make myself feel a little better about "declining" a role that promised a fast-track to leadership/management, which was something I was interested in at the time. So I met with the VP-level guy at Allstate who had seen my presentation, and I asked for $25/hour. Surprisingly, he said yes, and so as uncomfortable as it was, I gave my notice at the startup. There were around 9 of us at the time, and the other two devs were upset, really almost angry with me, and they were shitting on Allstate, saying how I wouldn't grow as much there as I would here, etc (they were wrong).

So I'm at Allstate working under this VP who saw my presentation, and I'm spending a couple hours each week one-on-one with various devs in the company, getting all this personalized attention and education, and it's great. By the summertime, I am working 4 days/week remote. The devs got to work from home. I forget if the BAs and QAs and PM could. I don't think so... Anyway, we would just come in on Wednesdays, that was the designated "meeting day" where sprints would start and end, so we'd get the retro and planning out of the way. Things are going pretty well, until my team completes the project we were created to complete. The team I end up on after that is pretty toxic, and there was a guy who was jealous that a 20-year-old college student was making waves (a lot of people were jealous of me, understandably- but this guy took it to another level). This one guy, I would find out, is a sociopath (or a psychopath). It was only after I left (to get away from him) that the company realized he's bad news and got rid of him. He lied compulsively, and sold himself as this unicorn cowboy that could do anything, but he ended up failing miserably as a dev lead. He bashed me behind my back to management and anyone who would listen, so he could get the dev lead role I was supposed to get, only to completely blunder it. Absolute ass.

Anyway, so I had to go out interviewing to get away from this guy and this team, and I ended up at actually a really nice place that was on the tail-end of its "startup" phase. I got a huge salary bump, a title bump, and got to work in more cutting-edge stuff than what Allstate was about. There was a lot of free food and such too, of course. After about a year and a half at this company, this startup founder reached out to me on LinkedIn and wanted to talk about working with me on a moonlighting basis. I said sure (I love networking) and I did some 1099 work for him for a few months. They started asking about whether I wanted to join them full-time after a couple of months of that, and I indicated I was open to it, but I was just given more responsibility at my current job and I wasn't sure I wanted to leave. They pushed, and again I did my "give them a large comp figure" thing... and again, they accepted. Nothing was written in stone, but I was having a great time with the stuff I was building for this startup, and I loved the people, the office location, the product idea itself. It seemed like a perfect fit. So I quit my day-job, expecting to take about a month off in between to reset and relax. That's when COVID broke out in the US, and the startup was having a harder time getting funding and getting clients, so I ended up unemployed for a couple of months while the world figured out how serious COVID was, and then I interviewed and got a job at a random no-name company, again making a lot more than I was in my previous job.

This company made all manner of promises related to moving from waterfall to agile, implementing Apple's release cycle (one big release per year, et. al.), doubling the size of the dev team, moving to Azure and being able to immerse in that... most of it did not come to fruition and the bits that did, did so much later than originally promised. This company was by far the worst-run software shop I have ever heard of or worked at. It was a sweatshop, and there was never any time to breathe, much less learn new things on the job. This was my shortest tenure at exactly 1 year. I wouldn't necessarily have left at that point, though, except that I got an unsolicited message from another recruiter on LinkedIn about a very unique-sounding role on an R&D team at a larger company.

I interviewed, got the job, and I've been at this company since (going on 2 years). What has me looking NOW is the company was hacked/infected with malware 3 times last year, and so the CIO is "overcompensating" with measures that really only serve to make our jobs harder. For example, we must log back in to things like the AWS console several times per day because the timeout is so low. So I'll be in the middle of something, and suddenly get kicked out of AWS and have to go MFA back in and refresh all my AWS tabs because they all pop up with the "you have been signed out" message. Also, accounts that are inactive for something like 1 week are automatically deactivated, so anyone who goes on any real vacation comes back to... bullshit. There is apparently no provision for saying "hey I will be on vacation for the next two weeks, do not deactivate my account). It's incredibly dumb, and I know that most companies won't put me through stuff like that... so I am looking again, casually, but... I know in the long-term all these "security measures" will kill my morale.

So I guess from my perspective... either I am incredibly unlucky, or y'all just suck it up and stay in shitty situations for one reason or another, perhaps in-part because you are afraid of how it will look on your resume. I dunno man. Life's too short, I think. Yeah I have had a couple of companies poke me about the short tenure average, but they were all companies I did not want to work for anyway (really it was that they were people I did not want to work for).