I suspect the answer is they don't, at least not with the frequency your examples would suggest. Let's look at your examples.
....Ph.D., Harvard University 1998....
This does not mean that this person was a professor. This means they earned a PhD. A PhD qualifies one to do research; it does not give them a permanent position. If they cannot find a permanent position, or are not interested in continuing in research, they will have to make other plans.
... After working as a research mathematician for a few years ...
This person was probably not a tenured professor either. A "research mathematician" is a bit vague, but I suspect it is a post-doc position, or perhaps a non-tenured faculty-level position. Either way, when the temporary position expires, they will need to find a job.
Former Associate Professor of Classics, Sweet Briar College
So this one definitely has "professor" in the title, and this person probably has tenure too. However, "professor" is an overloaded term -- I suspect your question refers to professors at major research institutions who do research and publish and teach college classes and advise graduate students. In contrast, this person was a professor at Sweet Briar College, which has about 300 undergraduates, no grad students, and no mention of mathematical research on their website (that I could find) at all. So being a professor here is not all that dissimilar from being a high school teacher, and is quite different from being a professor at a major research institution.
As others have noted, Sweet Briar College has had severe financial and other problems recently; this could explain this particular decision.
...Asst. Professor of Arabic, Williams College (7 yrs 1 mon)
Assistant professors are generally not tenured, and 7 years is usually the longest one can postpone a tenure decision. I'm not sure what happened here, but I'm guessing that tenure was denied.
So, I would challenge your premise: you have not provided any examples of tenured professors at major research institutions who left their position to teach high school. I suspect this happens very rarely, and when it does happen, it's for highly personalized reasons.
You also ask:
wouldn't these [PhD mathematicians] be bored teaching the same (relatively basal) material yearly
Well, maybe, but if you don't become a professor you have to do something. Personally, I find "the assumption that you would not want to be a high-school teacher if you could be a professor [to be] a bit belittling" (to quote @Jeffrey). Some people probably enjoy teaching and working with younger students; others just need a job and prefer the familiarity of the classroom to the unknown of industry.