A large amount of assets yielding healthy levels of passive income will.
I can think of the following, and there are probably others:
1. To know your market value so that you know what to ask for during your compensation review at your current company.
2. To practice interviewing skills when you don't need them, so that it's easier when you do
3. To network and learn about companies that might be relevant for you in the future (as in, you wouldn't accept an offer now, but if it looks nice you might apply again later, and if it doesn't you might consider it only as a last resort).
2. especially makes sense for coding interviews, and I've been advising the following to a few friends: ideally, one year before you actually want to apply, apply everywhere you can with such interviews. Your results won't matter anyway, you'll be able to apply again one year after, but you'll get a lot of real-world practice and an idea of what you might want to work on.
I was not actively looking and the thought of leaving hadn't crossed my mind.
It is not because of loyalty it is because we are risk averse, a new job is a lot of risk. Many things can go wrong you may not like that new job, or even purely financially it can be risky as a new company may not pay as promised, shutdown, you get fired pretty quick and may not find a job at same compensation , or variable/ equity compensation wasn't as good as promised/imagined. All of these scenarios have substantial financial risk.
To take that risk(even if only financial) there has to strong motivation.
You don't have to look around to know that you're underpaid, just talk to people from industry and they'll tell ya
Otherwise I have quite high job satisfaction.