Have you ever been to a normal (non-themed) party when some people who were not invited stopped by and somehow ended up ruining everyone's good time? I can remember a post high-school shindig where everyone was sent home because some unknown guest punched an invited party-goer in the nose. There was a party from which I was fortunate enough to be absent when some kids tried to sell hard drugs then stole some personal property. I think everyone's had the experience of wondering if some of the people at the party are vouched for or if they're just drinking free booze.
Dressing up is a way to let everyone else at the party know that you are on the inside. You got the invite and prepared for the party so you belong there. This mechanism wasn't needed at my small undergrad institution because everyone knew everyone else at a glance. If a stranger was spotted, they were asked who they were with. That's not so easy to do when guests come from a school a couple hundred times as large.
I went to a party in Tallahassee where I knew one of the guys who lived there and some other invitees (who had confirmed that they were coming via Facebook). Well, these other invitees ended up going to a different party and I was there with a ton of people whom I'd never met. Luckily, I was dressed for the occasion and nobody thought that I might not belong.
Signaling is costly. It means that one must dress up for parties in Tallahassee. This act requires forethought, perhaps purchase of new attire or accessories, and time to get dressed up. However, the benefits of keeping strangers away (and having an automatic topic of conversation with fellow party-goers) outweigh the costs in places where this phenomenon exists.