It's a desk job that gets you home at a consistent time, and requires little specialized training. It's got sucky aspects, sure, but at that level of candidate competitiveness it beats out a lot of other choices.
It's got a ton of extrinsic social reward in it. People like and respect teachers, and you get to see the result of your work when your students do well.
Again, lots of extrinsic social reward. The people you care for get better and appreciate you, and you're part of the mission to help people get better. Keep the unpleasant cleaning and remove the thankfulness and you get janitorial work, which is male dominated.