Loyalty seems to be mean very little these days to people and most people I know job hop every 1-2 years.
I've been at my current job for 13 years. My previous job, 5. It seems like people look down on you when you tell them you've been at a company that long. It's like they immediately assume you are lazy, are milking it or wonder why you haven't moved around like they have.
For me, it's all about job security and stability. If I can find a job that pays well, isn't boring, has some meaningful work, learn different things and is in a good industry, why exactly would I want to move around? I get looking for higher positions and pay but that has never motivated me. I just want enough money to pay my bills, some spending money and some to put away into savings.
One downside is if you do lose your job, some employers might think you are a one trick pony and pass you for younger blood. Also, if you happened to get fired for some reason, you just blew a decade + of your life and will have to explain yourself on a resume.
I've looked and I'm pretty sure I could make more money elsewhere but my mindset is my current job survived the recession, allowed me to buy a house, buy and fully pay for 2 cars and now thrive during COVID. I just wouldn't want to let that job security go for a slight bump in pay. It seems like others though, they'll leave a job for $1 or $2 extra an hour or the slightest bit of stress.