Well, I can give you one obvious and unfortunate reason why some studios are against public parties. They are afraid of the competition. Schools with poorly trained instructors, poorly trained students, incorrectly trained students/teachers, and especially schools with students who are paying too much, never want to have an open party.
Opening up a party not only brings new dancers into the studio...it lets the students meet, talk to and compare their dancing with that of other dancers taking lessons from somewhere else! Sometimes if you have something to hide...well you don't beg trouble to come through your own front door. Most reputable schools do have open parties. Many years dancing have taught me that students don't necessarily stay with a particular teacher simply because that teacher is the best dancer

A confidant pro knows their students and isn't usually especially afraid of losing them.
That stated...many studios have a much "nicer" reason for limiting their parties. Common issues are...liability...worry over getting some disruptive, uncooth or just generally disagreeable people in the studio...worry over "plants" or students especially sent over from competing schools to bad mouth teachers or other staff (this can be a big one)...the list could go on. I have never heard a worry about loiterers though...sounds fishy to me.