They can work a different job then. My point is it isn’t correct to compare the salary of someone working the entire year with someone working only 10 months (in addition to the winter and spring week-long breaks).
There is a big misconception that teachers, of all college-educated professionals, are the most underpaid. I remember decades ago being at a Democrat fundraiser (I switched parties so no longer go to them) when one of the attendees was telling me how awful it was to expect teachers to live on $70,000 a year, which was near the top back then. My salary was $65,000 at the time, and I was quite comfortable with my income, but I didn’t want to disclose my income to him.