There are a bunch of different reasons:
1. Someone to talk to when the line is really long.
2. Safety in numbers (running the gauntlet. Often huge crews of guys hang outside the ladies room and it's less intimidating to get past them when you're two.)
3. Some club bathrooms are terrible and it helps to have someone there to pass you tp if there's none, or hold the door for you if the lock's broken, hold your stuff for you, etc...
4. Sometimes it's for morale boosting. Half the time spent in the ladies room is not peeing, but rather fixing. Some women do the whole "I'm fat, I hate my ass, my boobs are too small" while applying lipstick in the mirror and it's up to the other one to say "No you look beautiful, I love your hair, you're not fat at all." The first woman feels better and is ready to go out there again.
5. Force of habit. It's something you learn when you're ten and no one ever questions it from then on.