Why did surnames emerge?
First names have likely existed since possibly soon after humans evolved into their modern forms. However, the origin and development of surnames (or last names) is far less known and is likely a more recent phenomenon. People were often designated by their larger kinship groups, often through a male line but sometimes female, as part of their identification in more ancient periods. Distinguishing by a specific surname for a person though is still not universal throughout the world, although it is now very common.
Origin of Surnames
Surnames, of sorts, are known from ancient periods. However, these surnames often had to do with clan names or names of places used as a way to distinguish a person. For instance, in ancient Greece, it would be common to refer to a person from an ancient city. Another way people were distinguished, which is still used such as in tribal groups in the Middle East today, is to refer to the name of the father for the son or daughter as the person's second name. In Japan surnames never existed in the modern sense but they were used to reflect roles people served in society, including to how they served the government they belonged to. In Africa and Asia, clan names have been used as something similar to a fixed surname, as clan names tend to be more static.
However, these could change over a long period. In the Roman Empire, family names were sometimes used, but often this had links to clans or if other systems were used family names would often drop or not be carried from generation to generation. In other words, there was no fixed system of using surname designations. Ancient China may have one of the oldest traditions in using a type of surname. It seems a matrilineal and later a patrilineal system emerged where the child would take on a fixed surname that would designate the person's lineage. However, it is possible these names could have changed after multiple generations.
Early surnames were generally not fixed and this meant that after one or two generations, it was common to lose links with someone's more distant past. The first recorded surname where that surname appears to be fixed appears in the 10th century in Ireland, where the surname Ó Cleirigh could be the oldest continuous surname. However, centuries later surnames were still uncommon in most of Europe and if surnames were used it was usually in reference to an occupation or sometimes in reference to someone's father. In effect, these surnames did not continue beyond a few generations.
Surnames may have begun to become more established in the West during and after the Norman conquest (Figure 1). At around the 11th century, the Norman nobility began adopting surnames that denoted location of origin or land in which they held. This allowed them to make claims to land and it was common to use the French 'de' (of) in connotation to a place or land. This then became a way the noble classes could distinguish themselves from others and it also allowed them to use this second name as a way to pass that name to their kin so that land could be inherited. It effectively became a status symbol to have a fixed surname so that there was no ambiguity of the person's status. This was similar to how French feudal land owners also used designations such as 'de' to identify their land ownership.
Slowly throughout the late Medieval period more families began to use fixed surnames. In Europe, people were still commonly referred to by their occupation (e.g., Butchers, Carpenters, etc.), but those designations began to be fixed as lower classes began to imitate the upper classes, even though they may have not held any significant land holdings. In some parts of Spain, people would use a patronymic system, where it would take the name of the father as the surname, but in the Medieval and late Medieval period those names began to become more fixed. By the 1400s, many people began to have fixed surnames. In England, Henry VIII in the 16th century ordered that children take a fixed surname from their fathers. This allowed people to be more easily recorded and this may have helped further establish the system of a fixed surname.
Recent studies have shown that most surnames that derive from Europe have four different types of origin. They are either place-based (place of origin), occupation name (i.e., a likely trade conducted by past members of the family), derived from their fathers' name (often first name), or simply a nickname given to someone at some point that stayed in the family. Surnames are a combination of a single place origin, that is the surname was derived at one place and one time, while other surnames are combinations of different events and circumstances. For instance, having a surname that combines an occupation and nickname.
It was mostly after 1600, as European powers expanded or increased their influence, surnames became globally prevalent. It became easier for rulers and administrators to designating people with fixed surnames, as this facilitated records in keeping track of people. Japan, Thailand, and Turkey are examples of countries that changed their normal family name systems to adopt fixed surnames due to Western influence on administration (Figure 2).
Since the early Medieval period, women often adopted designations, or whatever was used as a surname, from their husbands. This practice carried over as more people began to adopt fixed surnames. It was only in more recent periods in the 20th century that women began to forgo adopting their husbands' last names. In 1979, part of the UN declaration for womens' equality called for the end of the practice of forcing women to adopt their husbands' surnames. 
Surnames, historically, had a major impact on social status throughout the Western world as they became increasingly adopted. In fact, the origin of many surnames seems to be because people wanted to distinguish themselves from others by adopting a fixed surname. This has also been the case in many non-Western states, as they began to increasingly adopt Western-style surnames. Although the origin of many surnames in non-Western states used local terms or references, the effect on status has been comparable in many cases. While class was often the immediate identifier for people when surnames were used, today surnames still have a powerful effect in social distinction. For example, ethnicity and religion are often assumed when certain surnames are stated.
While using naming designations to distinguish people has existed since early recorded history, systems were not generally fixed and surnames were often only relevant during a lifetime of an individual. Sometimes kinship-based surnames lasted for multiple generations, in cases where clan distinctions would be used. However, in many parts of the world surnames were either nonexistent or were not fixed. Distinguishing class became a primary motive for the development of surnames in the West, starting after the Norman conquest. Soon, this pattern was imitated by lower classes. It was only during the rapid expansion of European powers and influence from around 1600 did formal, fixed surnames become a global phenomenon. By that point, many regions either imitated or may have been even forced to adopt fixed surnames to keep track of individuals and facilitate record keeping.
- For more on the ancient origin of surnames around the world, see: Redmonds, G., King, T., & Hey, D. (2011). Surnames, DNA, and family history. Oxford ; New York: Oxford University Press.
- For more on the origins of Irish surnames, see: MacLysaght, E. (1985). The surnames of Ireland (6th ed). Blackrock, Co. Dublin: Irish Academic Press.
- For more on the history of English surnames, see: Fiennes, J. (2015). The origins of English surnames: the story of who we were. Robert Hale Ltd; 1st Edition edition.
- For more on how surnames evolved in England in the late Medieval and early modern period, see: Smith-Bannister, S. (1997). Names and naming patterns in England, 1538-1700. Oxford [England] : New York: Clarendon Press ; Oxford University Press.
- For more on an example of the spread of fixed surnames, see: Sevilla Casas, E. (1977). Western expansion and indigenous peoples: the heritage of Las Casas . The Hague: Mouton.
- For more on the history of women, marriage and surnames, see: Vanguri, S. M. (Ed.). (2016). Rhetorics of names and naming. New York: Routledge.
- For more on the impact of surnames on status and social standing, see: McKinley, R. A. (1990). A history of British surnames . London ; New York: Longman, pg. 200.