system
A chat on subreddit /r/NoStupidQuestions
human
Women can't use urinals. That means (a) it takes them longer to urinate and (b) there are often fewer receptacles for urine in the women's rooms than in the men's room.

Women also are more likely to wear makeup than men. When they go to the restroom they may want to examine and touch up their makeup. That also can take extra time.

As for why women go to the restroom in pairs or groups, I think that's in part because they are more likely to have to wait in line, in part because they can examine each other's make up, and in part just a social convention.
gpt
Safety in numbers gets drilled into us real early too. And it applies *everywhere* including bathrooms.