Imagine keeping order in a situation where only the top-ranked male and female are allowed to mate. It works in some small coral reef fish, but only with a strong threat of punishment.
Lower-ranked gobies not only keep their place in line, they starve themselves to stay small and non-threatening. Now that's an orderly queue.
What's the threat? Any lower-ranked fish who challenges the fish above gets expelled from the group for losing a fight. And that can mean death for these small fish who depend on the group's coral reef territory for shelter and food.
I guess it's better for a little fish to stay small and wait for their turn, rather than risk losing an all or nothing challenge to move up the line and get a chance to mate.
This is a classic example of a dominance hierarchy, such as the "pecking order" observed in chickens. It's fairly common in the animal world for social status to determine access to food or sex. Sounds like junior high school to me.