The girl who had the party may not have invited all these kids. Word gets out there is a “party” and the masses skedaddle on over. Yes, most private neighborhood pools here(if not ALL) have a rule about the # of guests. No way could all these visitors have access unless they stormed the gates. In CR residents have identity cards for the pools. I’m guessing many of the kids didn’t gain access and were ticked off.
Have you ever been at a party that had the police arrive (responding to a noise complaint)?
The first thing the host typically does upon seeing the car (or being notified of police presence at the door) is to turn down or stop the music and insist that the crowd be quiet and while they handle it.
How did the hostess respond to the news that the DJ was charging people to attend and broadcasting an open invite? I doubt that is kosher with HOA policies.
Party doesn't have to end when the police arrive, it's all how you handle the matter (reduce the volume, control your crowd, etc.).