I think the main issue is that with the undergrad standards where they are right now (certain SAT scores acceptable for program admission...courses that undergrad teaching candidates have to take...etc.), we still have a shortage of teachers in STEM-related areas. It's obviously a supply-and-demand thing. If our supply is already lower than demand, we can't just insist that we tighten up our standards. Yes, money is a factor. Average salaries don't mean as much as starting salaries. Also, no matter how talented a beginning teacher is, there's usually a "pecking order" to go through and a first-year teacher is more likely to be teaching Algebra-for-sophomores-who-failed-it-last-year than advanced mathematics classes to students who are mathematically gifted. A few years of that can be defeating to a teacher who went into the profession with aspirations of mentoring young, talented students who enjoy math, but there are only so many "advanced math classes" to around. There's also a definite lack of "status" in our society when it comes to teachers. As a highly-gifted student who was the only girl in her advanced high school math courses, almost every teacher and adult in my life tried several times to talk me OUT of teaching because "I could do so much better than THAT!"
With all of that being said, I'm an elementary school teacher who had top-notch SAT scores and several passed AP tests under my belt before I entered college. I feel like I'm very good at what I do. However, some of the absolute best teachers that I work with admittedly struggled in school themselves. In some cases, I'm sure that gives them an ability to empathize with struggling students and be able to come alongside and help them intuitively in ways that I have only read about in textbooks.
I think we need to do a better job of encouraging our bright kids to consider a career in education, and we need to be willing to pay them both an appropriate salary AND the respect they are due for what they choose to do. I do not think that we need to completely close the door to the profession for those who may not have been National Merit Scholar material in school themselves, though.