The brutally honest answer is that we don't really know. The number 7 has significant mystical or religious importance in many cultures, but is particularly deep-seated in Zoroastrianism and, by extension, all of pre-Islamic Iranian history. This seems to have grown out of several groups of seven divine concepts in pre-Iranian religion.
The first time a group of seven noble houses appears in Iranian history is as part of the coup which brought Darius the Great to power. Darius and six other prominent nobles stormed one of the minor royal palaces in Media and assassinated Bardiya, the son of Cyrus the Great, or a priest impersonating the deceased Bardiya according to the story they told after the coup. After Darius was named king, he commissioned the "Behistun Inscription" as a monument to his seizure of power and success in the ensuing civil wars. Part of that inscription also includes a command for Darius' successors to honor the family's of his six co-conspirators above all others.
Generally, that directive appears to have been honored because Greek sources repeated the story of seven great families (including the Achaemenid royal family) for centuries afterward, and many of the conspirators' descendants remained very powerful for the next two centuries. In the rare instances that some of those family fell from favor, it seems that their position in the group of seven was refilled based on the appearance of new names in the list of seven original conspirators in later Greek versions of the story.
After the Achaemenid Period, the concept vanishes outside of historical references to the Achaemenid system and does not resurface until the Sassanid Dynasty took power almost 600 years later. However, the Seven Great Houses of Iran appear fully formed alongside King Ardashir I in many histories and are all identified as clans of Parthian descent. The implication seems to be that the institutions of the Seven Great Houses appeared at some point in the Parthian period and was only documented under the Sassanids.
They could not simply have been the seven most powerful clans at the time because many of them were concentrated in northwestern Iran while nobles in other regions commanding larger territories must have had greater material power and influence. However, this same region, around the early Parthian capitals Ray, Ecbatana, and Nisa probably indicates that they stemmed from some specific part of the Parthian aristocracy.
That said, there is a post-Sassanid source that may shed some light on their origins. The early Islamic historian Al-Tabari wrote his History of the Prophets and Kings in the early 10th Century. The history mostly focusses on Islamic history up to Al-Tabari's own time, but the first few sections attempt a synthesis of ancient history based on a combination of Biblical, Arabic, Greek, and Persian sources. According to Al-Tabari, the Seven Great Houses traced their lineage back to the governors of seven provinces established by the legendary king, Kay Vishtasp.
In late-antique Zoroastrian/Sassanid literature, Kay Vishtasp was a synthesis of Vishtasp, the first king to patronize the prophet Zoroaster, and the Kayanians. In the early Zoroastrian scriptures collectively called the Avesta, a series of heroes and rulers are given the title "Kay," apparently a somewhat generic marker of reverence. In later tradition, these heroes were reinterpreted as a dynasty of kings with "Kay" as their dynastic name. By the Sassanid period, the ancient Achaemenid dyansty was almost completely forgottten and the Kayanian kings filled the Achaemenid place in history as the dynasty before Alexander. Of the Achaemenids, Darius III was the only one remembered in any detail by the late-Sassanid period as Kay Dara in the story of Alexander's conquests.
But Kay Vishtasp may have assimilated part of Achaemenid history into his own mythos as well. Modern linguistic analysis of the Avesta typically dates the life of Zoroaster, and thus Vishtaspa as well, to around 1200 BCE. During the Achaemenid period, Greek sources generally reported that Zoroaster was already considered ancient (with Classical Greek dates ranging from 6000-1500 BCE). However, by the Roman and Parthian period western sources started reporting a much later date for Zoroaster, making the prophet a contemporary with Cyrus or Darius the Great. Sassanid and post-Islamic Zoroastrian literature tends to report that same time period.
The answer can probably be found Ammiaus Marcellinus' Res Gestae, which identifies Hystaspes, father of Darius the Great, as the patron of Zoroaster. Hystaspes was simply the Greek rendering of Vishtaspa, and it really was the name of Darius the Great's father. However, sometime after the fall of the Achaemenid Empire, Hystaspes the father of Darius was conflated with his own namesake, Vishtaspa the patron of Zoroaster. It's not at all unlikely that a version of the Behistun Inscription narrative or even an Aramaic translation of the text survived into the Hellenistic and Parthian period and influenced a story of Vishtaspa, rather than Darius, founding seven noble houses.
That story may have percolated during the Hellenistic Period and been used as the basis for establishing Seven Great Houses under the Parthians, or it may have circulated later and been used by the Parthian clans to claim legitimacy. Ultimately, the exact origins of the Parthian and Sassanid houses remain a mystery, but despite several centuries of separation they still had a loose connection to the original seven noble families of the Achaemenid period.