From an ethical point of view, maybe. From a rational point of view, maybe not.
Jobs are "sticky" — it's a pain to apply for jobs, arrange interviews, deal with the possibility of getting rejected. And if you do get an offer and accept you will be leaving colleagues that may be friends, risk your position being less stimulating, have to move house and/or deal with a new commute.
There is a very real salary range between "low enough that I'll think about applying for other jobs" and "so low I'll actually start applying for jobs". Employers are aware of this and are paying salaries accordingly. It sucks for everyone in that salary band but — ethics and long-term viability aside — it's still the rational economic choice for employers. Every now and again someone will quit and get their deserved 40% increase, but many will delay leaving for years, or simply put up with it indefinitely, saving employers tons of money.
Of course this may not be the case forever. It seems like recently the cohort of people who find interviewing and changing jobs more tolerable (the so-called "job-hoppers") is increasing in size. If you happen to be a part of this cohort, then congratulations, you're winning the job-market pain-of-change-vs-salary arbitrage game and will enjoy above-average year-on-year salary increases for at least the near future.