The Sith Code valorizes a life lived uninhibited — which is inevitably a problem for a structured organization. Every Sith Lord believes themselves to be superior and/or lives their life in a way to make themselves so. As such, other Sith are not comrades; they are rivals to be used or slain.
“The urge to kill one’s superior is intrinsic to the nature of our enterprise,” says Plagueis while warning Sidious of how the younger Sith will grow to hate him during their training.
Thus, a millennium before the “Star Wars” films, one survivor of Sith infighting, Darth Bane, created the Rule of Two. There may only be two Sith at a time, a master and an apprentice. When the student grows strong enough, they kill their teacher and then take a disciple of their own, repeating the cycle.
If the Sith stopped following their code of greed and selfishness, they’d no longer be the Sith. However, Bane’s Rule of Two takes those qualities and works them to the benefit of the Sith lineage, not just individual Lords. The idea is George Lucas’ own, but author Drew Karpshyn got to show the origins of it (at least as far as “Legends” go) firsthand with his “Darth Bane” novel trilogy. Bane summarizes his tenet:
“Two there should be. No more, no less. One to embody power, the other to crave it.”