It is not that particular class that may be worse if it is smaller. It is the overall offerings and access. For example, if the instructor is a leader in the field and 300 students want to take his/her class that has a limit of 30, who gets to? Do 270 not get to take the course, or need to take it with less desired instructors?
Another situation is, is it better to offer one large lower level course and ten upper level courses per semester, or six small sections of the lower level course and five upper level courses, using the same number of faculty?
The answers to these tradeoffs are not the same at every college, and what is more desirable can vary by student.