It's not just that other professions pay better: teaching is a sort of "mission impossible" that breaks everyone but the most dedicated and enthusiastic.
My high school biology teacher was an excellent teacher. Everything about his style was enthusiastic. He retired at 55 years old and became a real estate agent. I saw him a few years later, and asked why he gave it up. He said he wanted to go out at the top of his game. He didn't want to become one of those teachers who goes to work because they need the money. All students are apathetic about some of their classes. I think it bothered my poor high school geography teacher that no one actually cared about her class.
I don't think many people realize that "traditional" public schools are themselves an experiment that was never evaluated. This article talked about the first public schools, but doesn't comment on the actual details: these were one-roomed schoolhouses with a single teacher. This is a 'traditional' public school, not the factory schools the industrialists gave us [1].
[1] my comment on the myth of the superiority of age-segregated classrooms: https://news.ycombinator.com/item?id=14425760