In the case of Rome, Machiavelli says that even though the city was originally established as a kingdom, fortune and chance allowed it to transition to a state that had at least two of the three required representative constituents present: the two consuls who stood for royal authority and the aristocratic senate. All that was left was access by the people, the democratic element of government. This would be accomplished by the creation of the tribunes of the plebeians.
The process of political transition is not without its troubles, and most people would rather not acknowledge that the three separate factions do not always share similar interests or have identical desires. Political life, though, is part of the life of men, and men, so says Machiavelli, are evil creatures who will always seek to act cruelly to others if given the chance. Rulers who seek to found cities and political associations, not to mention political philosophers who wish to remake the world according to their pet theories, ignore this at their own peril.
This inherent evil in man is what necessitates the representation of each faction within the city. When Rome was no longer ruled by the Tarquins, the unchecked aristocratic class, which no longer needed to fear an alliance between the king and the people, began to abuse their authority over the plebeians. The tribunes were birthed from the conflict between these two classes, and Machiavelli recognizes that these conflicts, rather than creating total disharmony or anarchy, helped hold together a relatively stable political order for three centuries. The evil of men combined with the disparate interests of each class, with no faction going completely unrestrained, created conditions favorable to liberty.