I’m sure you know at least one Kim. Even as a Korean, I’m struck by how many Koreans share the last name Kim (김, or 金 written in Chinese). In fact, more than 20% of all Koreans are Kims, according to the latest census. There is only one other country in the world that has this unusually high concentration of one last name—Vietnam with its Nguyens.
Truth be told, Kim is one of the oldest family names in Korea. It is also the last name of one of the three ruling families, Bak (박, Park or Pak) and Suk (석) being the other two, of Shilla (신라 or Silla) Dynasty that ruled southeastern part of the Korean peninsula for almost 1000 years (59 BCE to 935 CE). But that does not even begin to explain the given question, for there were only a privileged few who could use surnames.

BTW, the other two kingdoms at the time of Shilla, Goguryo and Baekje were ruled by Go (고 or Ko) and Yeo (여) families, with the latter being shrouded in confusion as to the real name. This goes to show that the usage of last names at the time might not have been all that important or prevalent.
With Shilla declining in the early 10th century, a new dynasty emerged. It was called Goryeo and was founded by the Wang (왕) family. Still, the usage of surnames was limited to only a select few.
But by the middle of the 11th century, things began to change. King Munjong of Goryeo decreed that no person without an official last name could participate in the National Civil Service Examination—this was the one examination that could guarantee government employment, something that was considered the highest honor one could get for himself and his family. This is when the common people started scrambling to “buy into” a last name and it is no coincidence that so many surnames originate from this era.
(** personal note: The first of my own ancestor in the Indong Chang (장, or Jang) family was Jang Geum-yong who was an army general during the early 11th century, and his son Jang Sun served under the aforementioned King Munjong. For now, don’t worry about the “Indong” or “Kimhae” in the above caption for the image in front of the actual last name. It is a whole separate matter that needs its own blog posting.)
Despite the fact that more people were bestowed a family name, the total number of people that even possessed a last name was thought to be less than 10% of the entire population by the late 16th century. So far, there is no evidence of too many Kims being born in the Korean peninsula.
But there was a clear trend where many of the foreign immigrants (mostly military people) from neighboring countries or states were taking up the last name of Kim, or more precisely they were given the Kim name by the royal Court for one reason or another.
Enter the reign of Prince Gwanghae (1608~1623). Because of his eccentricities and cruel behavior, he was overthrown, never given an official King’s title, and written in the history books as Gwanghae-gun (광해군, Prince Gwanghae), as opposed to the usual kingly moniker that ends in either jong or jo (more on this in a separate posting) such as Sejong, or Jungjo. Politics during that era has deteriorated so much that many local magistrates were forced to sell minor government positions to anyone who could afford them. And by law, because all government officials were considered nobility class (양반, yangban) with a surname, there was a whole new class of people who started having last names.
But it wasn’t until about 100 years ago, Kims started showing up on census record books in an explosive way. By all accounts, the servant/slavery class during the 500-year Josun Dynasty made up anywhere between 40 to 50% of all Korean population—hard to believe. And when the classification of people was abolished in 1894 and the Court started recording all citizens into its books in 1908, the huge servant/slavery class of people took up the last names of Kim due to its long history and its reputation as a classic yangban last name. Thus, the exponential growth of Kims in the last 100 plus years.
So, when a Korean person says that he or she comes from a long line of nobility or royal house, there is more than 50% chance that he or she is sorely mistaken and they are actually from a line of servants—not that any of that matters in today’s world.