My aunt did exactly above, and felt it was a moral duty to let new younger teachers have the spot (nevermind it meant that she was going to draw a pension from the system for more years than she'd actually worked).
Plenty of other teachers feel the same way, though obviously not all.
But basically the only reason we can afford to live in the Silicon Valley is because I'm an engineer with a decent salary. A lot of her paycheck went right back into her classroom, and with the hours she worked, she was basically make $3/hr, despite getting some of the highest teacher pay in the country.
And all of her coworkers were in the same boat -- almost every one of them, even the senior teachers, were married to engineers. The few that weren't either had family money or at least had parents who bought them a condo or house. Or a good friend. We let one of her young teacher friends live with us for a couple years until she managed to save up enough for a down payment on a small condo, and then got married and got a second job.
It is basically impossible to be a teacher in Silicon Valley without a highly paid spouse or multiple side hustles.
The existence of California -- and San Francisco, in particular -- makes discussions like this one difficult, because yes, sure, San Francisco is too weird to exist and is therefore basically irrelevant in national policy discussions.
I live in Rhode Island. East Coast. An hour from Boston. Expensive real estate, high-COL (top 10 or 15, depending on which numbers you trust), etc, etc -- and yet, we are just absolutely nothing at all like California, which is its own very weird outlier that has nothing to do with the experiences of the almost 300 million Americans who aren't Californians.
Not SF, but more people live in LA County than in the ten least popular states. If only we could ignore them and their 20 senators as completely irrelevant when it came to national policy discussions...
(We can't, and we don't.)
[0] I would tell California that they need to permit about 10x as much housing if they want any more federal help. The U.S. Government should not take on the role of dealing with the consequences of such an obvious self-own. "Our teachers can't find places to live and also it's illegal to build apartments on practically every single lot in the state -- what should we do?" is a question that answers itself.
If you want to be in the Union, then one thing you have to do is allow internal migration, and by that I mean actually allow it, which means you have to allow newcomers to build housing. If you're not allowing newcomers to build housing, then you are not actually in any real sense fulfilling your obligations to the rest of the country.
While that may be true, it's important to note that the pension is only salary (and usually only 80% of your terminal salary) and not benefits.
So you'd spend a significant part of that money on getting health insurance.
Most teachers who have earned full pensions wait to retire until 67 anyway so they can get Medicare (and not Social Security, because they don't qualify for it since they have their pension unless they worked another job as well).