To supplement other answers and comments... :
In some cases, an instructor can get negative incentives to attract students, the supposed rationale being that this takes students away from other courses in the same department, pushing them to sub-acceptable enrollments. I myself experienced this some years ago having developed a then-new-ish crypto course and a then-new-ish error-correcting codes course within a (pardon me, but, somewhat stodgy) math dept. The traditional-stodginess leads to courses whose names and catalog descriptions were/are incomprehensible (and certainly not attractive) until possibly after one has taken the course... So, in that context, it is easy [sic] to develop a course that will attract students... but/and this might be (was) construed as extremely hostile to other courses/faculty in the environment.
On another occasion, when it was proposed to increase the size of lower-division math classes (mostly calculus...), when I asked whether that wasn't moving in the opposite direction of more effective teaching, the answer was that things were already so bad in that regard that the marginal worsening would be less than the gain in freed-up person-hours of instructors. Sure, the kids are pretty negligent students, but, still, ... ?!?!
So, in lower-division courses in math, the motivation for larger class sizes is "efficiency". And instructors with 200 students have virtually no responsibility for the individual success/failure, ... even the TAs usually have 60-80 kids... For upper-division, it takes a certain number to "run" the course. Beyond that, it is actually unwise and undesirable to rope-in more people if they're not really qualified or interested, since it drags things down... and in some cases one can be accused of sabotage of colleagues' courses!
For graduate courses (in math), again there's a minimum usually required, so one wants to offer something that appeals to more than 1 or 2 people. Beyond that, again, there is some push-back that one might be taking away from colleagues...
And, I note, in all cases I myself have been accused by colleagues of "pandering" to students (at all levels) by trying to engage/entertain/edify them... as though being boring were a fundamental virtue in the teaching of mathematics. And, also, the idea that exams contain "surprises", so that no one knows what to study, apart from "everything", etc. That really doesn't seem a productive pedagogical strategy, since the kids cannot effectively study/learn/assimilate "everything".
(The devices that one might use to maintain close contact ... often unwanted!... with large student populations are not subtle, but require some technological savvy. My experience is that the system-gamers were amazed-and-incensed that anyone would manage to prevent... in a large-population situation where they'd hoped for quasi-anonymity. Poor kids...)