* I think companies are doing this but they aren't looking to replace me so much as to make sure that anyone person doesn't affect things too drastically if they leave.
* "Frequent job interviews" is over stating things. Many interviews might only progress to phone interviews or coding exercises. One or both parties can learn a lot just from that. In person interviewing is rare because I really don't want to use my pto and spend time away for work just for practice. If the opportunity excites me though, I very well might.
* Getting me excited to interview with a company takes a lot. Especially when I'm happy at work, I'm taking into account big projects I'm working on, my amazing coworkers and bosses that I'm not ready to leave, etc. It's definitely about more than money. You're right that one can't look at it as just a black & white decision. It's multivariable and will shape your life for years to come. Choose wisely.
* Applying to jobs... This is interesting because most opportunities I see come from being cold called with interesting opportunities and having a conversation. It's important to be up front and say, honestly that you're not looking but open to a great opportunity. In the first call I usually give a very high price as well that would justify leaving earlier than I would like. I think it's fair to say that many people have an amount that is walk away money. Ideally if I'm leaving earlier than I'd like I should be able to tell my current boss and they will say "Damn. This sucks but I can't blame you. That's a great opportunity."
You're taking this as a very deceptive practice, but that's not the way it has to work. This can be practiced with an enormous amount of honesty. It might surprise you to know that even after telling companies that I love where I work and don't see myself leaving for a few years, they're fine with that. We will still chat.
At the very least, I'm expanding my network and learning more about other companies. I also use this understanding of other companies when I talk to candidates for my current employer to have some context.
To wrap it all up, here are my guidelines that I follow to do this in an ethical way:
* Be up front with the hiring manager that you are happy in your current job and don't have any plans to make an immediate change but are open to discussing opportunities.
* Accomplish some big things at each company you work for before leaving. In my mind this means don't hop around every few months. Stay a few years, build something you're proud of. If I were going to be coaxed away before accomplishing something it would take A LOT. But hey. I'll let someone try and make a case for it.
* Move on when the opportunity meets your "Oh shit!" criteria and don't feel guilty. If you're good, you'll always be working on an important project and it will never be a great time for a change. I also help my team reduce my bus factor as much as possible. I think that's valuable for the company as well should they ever want to fire me or move me to a different team.
* If you aren't happy at your current place, don't lie. Tell them so they can fix it. If you are happy tell them you are. If they ask if you ever talk to other companies say of course! That you are always networking and bringing the good parts you hear back to the office and simultaneously looking out for great people to recruit.
There's no reason keeping yourself sharp and knowledgeable has to be a win-lose scenario.