Darth Bane was a Sith Lord active during the last era where Sith Order consisted of more than two individuals. As the Sith were at war with the Jedi Order and the Old Republic, Bane noticed that Sith Lords would have their own plans upended by infighting and intrigue. The greed of the Sith became their downfall as the Jedi prevailed and destroyed the order, except for Bane himself. He realized that for the Sith to survive, they would need to limit their numbers to two - one master and one apprentice to crave the master's power. The Sith would also have to operate in secret to avoid discovery by the Jedi, and thus be able to undermine their work and that of the emerging Galactic Republic without being discovered.
Bane took an apprentice and passed on his knowledge to this individual alone. At some point, the Jedi discovered both Darth Bane's survival and his new philosophy. Despite killing Bane and believing his plan to be thwarted, his instructions for the Rule of Two survived. This philosophy was passed down along the line of Sith, guiding their actions to prevent the plan from failing.
After the Battle of Naboo, Jedi Master Yoda cited the Rule of Two in a discussion with fellow Master Mace Windu about whether the death of this Sith Lord meant the end of the Sith or if his master was still alive.
During the Clone Wars, Darth Sidious confronted his earlier apprentice, Darth Maul and his brother and by citing the Rule of Two, battled them in a duel to assert his dominance and get rid of two potential rivals.
During his spiritual quest to find a way to exist after death, Yoda encountered a specter of Darth Bane on Moraband and cited his invention of the Rule of Two as the reason Bane was not forgotten in the present time.