The strongest local gang establishes a monopoly on violence in their territory. They then extract tribute (taxes) from the local population in various ways. If they get too greedy and extract too much, then eventually the plebs have little enough to lose to break their established order and fight the establishment gang. The most competent gangs find the equilibrium of taxation that is the maximum they can extract without suffocating production and innovation or creating an opposing revolution.
So, in locations where this has happened in modern states, it simply demonstrates that the "official" police and state have failed to manage their monopoly on violence properly, and are being actively out competed by a more effective organization that, if it continues to sustainably control its territory, will eventually become recognized as the new legitimate state.