If I had two months off a year I'd take a summer job at Starbucks or whatever as well yet I don't need the money by any means whatsoever even if I took a prorated pay cut. Hell, I don't need to work at all because my spouse's income is more than enough to live off of very comfortably, but I do. The amount of time I work isn't an indication of the amount of money I need.
The argument in the parent posts is that teachers actually don't have two month off. They just have two month where they don't have to do client (that is pupil) - facing work to do.
Teachers actually need to cram a lot in that time. All the preparation for next year, all self-education they need to do to stay up-to-date, select reading and learning materials. Planning the curriculum etc. The equivalent to all that work that freelancers factor into their daily rate and all the work that employees often do on the job ("I'll need to read the documentation so I know how to properly do that", "I'll google it", ...).
The fact that they still take on summer jobs on top of that can serve as an indicator that they actually don't have too much to do in that time or it can serve as an indicator that they need the money more than their time off.