- They legitimately love their jobs and the kids.
- If they quit/are fired, and have to find a new job that may reset their steps (i.e. they take a pay cut, but not just for one year but for their career). Inter-district transfers can be blocked or have the same problems at the receiving school.
Plus there are some fields that are more in-demand than others (e.g. maths/science Vs. art/social studies).
Just like any career, the next institution looking to hire someone is going to ask about why that person left their last job. Regardless of whether or not the next school is public or private, they’re going to want to hire a teacher that is compliant rather than defiant. Even in the face of a teachers shortage, these schools are still obligated to teach a curriculum and won’t want to hire someone who they will likely have to replace in short order.
Indeed, schools aren't as isolated as businesses are, either. If you go rogue and make a huge stink at one school, you can bet no nearby district will hire you. On the other hand, if you play ball and do a decent job, other districts will look out for you when an opening happens. It happened to me, right before I left teaching.
Another thing to consider is that outside of large cities, you're geographically constrained. If you own a house and mess things up with your school, you're looking at having to add 30+ minutes to your commute to get to the next school. (Who will probably have heard of your escapades.)
Seniority is another factor to consider. It's very difficult for teachers in their first five years to get a job. (On average, it takes five years for teachers to become proficient in classroom management, so schools tend to prefer more experienced teachers). Anyway, that means there's a huge block of teachers who will have a difficult time despite shortages. Like in tech, it's primarily a shortage of qualified teachers. At least, when I was teaching ~5 years ago.