The reason job hoppers get more money is that nobody (or very few people ) take a job for less or the same money that they were making previously, and if you want to attract talent, you have to pay them. If you have talent, you have less to do to keep them there.. BUT most good companies find ways to increase the salaries of their current talent.
Bad companies never look at it and they go out of business.
Also, it's wrong to think that "loyal employees are always good for a company, new employees are not good." Getting fresh talent in and moving talent out can be good for a company. People get comfortable and they get set in their ways and it's bad for a company when the company gets comfortable and set in its ways... I'm sure most people who start somewhere new have run into the problem where you have a good idea and someone shuts it down saying "That's not how we do things here" or "you have to follow this process." Keeping the process has value, sure, but being open to new ideas and ideas from competitors is also important.
Good companies do prioritize retention. People don't leave Google to get raises elsewhere.
Most companies are poorly managed, because most people don't really know how to manage, and MBA programs were designed for managing staffs made up of unskilled labor, so almost everything they say is wrong in an environment where you're mostly managing professionals.
People job hop a ton in silicon valley, but it's also very common there. Staying at a company for more than 3 years is pretty rare.
But like you said, some companies have good methods of keeping people around. Mine has a lucrative bonus system that gets progressively better based on how long you're at the company and how well you perform. It means that after 2, 3 years you're making considerably more money than when you started, even if your base salary only ticks up by 3-4% a year.
So, if I go to apply at another company, when I tell them my salary demands, I'm going to tell them my base salary + my bonus is what I make in a year. If they can't meet or exceed that, then I wouldn't work there.