Its not 'simple'. Teachers generally dont get into the profession for the pay because its not terrible, but it does need a raise, they've fallen quite far behind inflation. Their benefits are actually pretty good - dental, health, massages, counseling, paid leave for medical, family, bereavement, etc, its pretty comprehensive.
And the job has a lot of security which many jobs dont. So that part's pretty good.
But the class size thing is anything but simple. A Kindergarten class with 22 kids is 22 kids. Likely a few learning issues in there but not really defined at that point. But then you get to senior high and now you have options. Might be 30 in an English class, but only 15 who are taking Band class. Or 10 in Biology but 25 in Chemistry, so how do you set a "class size" for senior high because not all kids take all the same classes.
And then comes complexity. Any teacher can tell you that a class of 30 kids who are all similar 'average learners' is far easier to teach than a smaller class with 20 students where 10 of them have individualized programs, 5 of them are new to Canada and dont speak much English and 2 of them have severe learning issues and need Educational Assistants because of extreme behaviour issues. So what's a good class size? 20? Or 30? It gets tricky and definitely not "very simple"