The department caps the enrollment for a number of reasons. In the case of the lecture courses there are three primary reasons: 1) space limitation; 2) TA considerations and; 3) professor preference. If the course is capped because of space considerations (i.e. the number of seats in the classroom) then the department cannot admit any additional students into the class until some students drop out. If the department can move the class to a larger room, then it will do so but there is a shortage of large classrooms on campus. If the course is capped because of TA considerations, then the department will only admit additional students if an additional TA can be assigned to the course. In both of these cases the professor cannot simply admit you into a closed class but must instead refer the matter to the director of undergraduate studies. If possible the department will try to accommodate the additional students but it is often not possible. If the course is capped because of the professor’s preference for a smaller class, then it is up to the individual professor to decide whether he or she will admit you into the class.
In the case of the seminars the department caps the seminars at 15 students and does not admit students to closed seminars. The size limitation is to insure that students have the opportunity to work on a more individual basis with a faculty member than they have had in the (mostly large) lecture courses.
If you absolutely must take a course, then you should make sure you register for it as soon as possible.