I went through that last year.
For me, the inertia was a little stronger because of my gender transition. I had zero experience interviewing as a woman, and I wasn't sure if I passed, so I figured it was safer to continue working for the same company I transitioned at. The logic was "they know me, they knew me before transition, they know I've only been living as a woman less than a year, and I already know they don't care, so I might as well take the safe option and stick with them rather than risk freaking an interviewer out with my voice or accidentally wear something a woman shouldn't wear to an interview".
Mind you, my employer at the time wasn't great. I was underpaid (75% market value in pure salary, plus I got no insurance whatsoever), my boss couldn't handle stress and took it out by screaming at his subordinates, software engineering leadership was absolutely terrible for multiple reasons (I and others tried to change it, and we were rebuffed, so the people I worked best with quit in frustration one by one), and I had a months-long nightmare involving the building management discriminating against me where my employer offered me almost no support (it only ended when I got the city involved). There were a number of other minor concerns as well, but these were the big ones.
During the worst of the discrimination, the owner/CEO promised me a bonus if I stuck around until our next product entered production. Production was delayed by two months from what was originally planned, and even then getting him to actually keep his promise was like pulling teeth, though I eventually got it. Somehow, I ended up staying on even after that, though I should've probably at least started applying for jobs once the bonus cleared my bank account.
It took way, way too long for me to accept that I needed to find a new job. Ultimately, after a particularly bad incident of my boss taking his stress out on me, I finally got up the courage to put myself out there, I got a wonderful new job, and I'm more than happy with my current employer.
In the long run, the devil you know is the worse devil.