It's because they are treated like shit by politicians, by administrators, and even by parents and students.
It ain't rocket science to figure out why.
And then the pay isn't enough to buy a middle-class income; you have to be married to "enjoy" that.
All of the idealism of ed school graduates soon goes out the window when they go to work in a school. Reality sets in. You find out you are accountable for everything and have little control over your work, especially if you have an asshole for a principal.
A teacher here tries to explain in several hundred words what takes me only a few sentences to say.