Think of it this way: in private firms, employees who demonstrate mastery of both their own specialization and "people skills" are promoted to management, so that they can guide and support the next generation of workers. They are paid more for this than their employees, in part due to the fact that not everyone can do what they do. Similarly, teachers have to balance knowledge of the actual material being taught, and all the "soft" skills of classroom management: facilitating discussions, maintaining discipline, keeping emotions and energy on an even keel.
Any manager who could effectively herd 30+ techies would be lauded as worth their weight in gold; why then isn't a teacher who does the same thing with as many children (a harder task, to be sure) appreciated as the deft administrator they must be?
Most people simply do not want to work in an environment like that.
Assuming that pay is tied to performance and the material being taught is relevant (two huge problems,) a good teacher more than pays for their salary in the increased productive output of their students.