Wikipedia states that "The alleged oldest commercial corporation in the world, the Stora Kopparberg mining community in Falun, Sweden, obtained a charter from King Magnus Eriksson in 1347". Is this actually the earliest instance of incorporation, though? How did the practice come to exist?
Depending on your definition of corporation, you could claim that Venice and other merchant cities of Italy were akin to corporations. Guilds could well be said to have been pseudo corporations and the Templar orders a pseudo-bank.
Corporations allow for a united front against competition, taxes, and a sharing of profits. The Merchant Adventurers of York (founded in 1357) are another example of a union of merchants.
The earliest instance of a "corporation" as we recognize them today has to be the Dutch East India Company which was established in 1602. The Dutch East India Company was the first to issue shares that were tradeable on a stock exchange in its company in part to raise capital for its operations. At the time of its founding similar trading companies focused on the trade with India started to be founded. E.g. the East India Company in England.
So, western Europe was the first place that the "modern corporation" concept arose.
The word "corporation" originates from Ancient Rome. Ancient Rome had special laws concerning the creation of corporations. Under the republic the creation of corporations was free, but starting from the reign of Augustus, only the Senate could approve the creation of new corporations.
A Roman corporation was unlike the modern ones. It was more like a club, trade union, or society. All members of a corporation were liable for the corporation's debts. Many corporations were created with non-commercial purposes. For example, the Church was considered a corporation legally.
There was also a body called the Council of Corporations in ancient Rome, which was re-created by Mussolini in the 20th century.
The Church adapted it from Roman law: "Christianity at its very beginning, found the concept of the corporation well developed under Roman law and widely and variously organized in Roman society. It was a concept that the early Christians soon adapted to their organization and, as a means of protection in the periods of persecution. Whether we attach to the burial corporations (collegia tenuiorum or funeraticia) of the early Christians the importance that De Rossi and other archæologists do, there can be no doubt that in the second and third centuries of the Christian era the corporation was generally resorted to as a means of holding, and transmitting church property. In later times this concept fitted in naturally with the genius of the religious orders, and the great monastic establishments of the Middle Ages were organized on that plan. "In the Middle Ages, all life", says Dr. Shahan (Middle Ages, p. 346), "was corporate. As religion was largely carried on by the corporations of monks and friars, so the civic life and its duties were everywhere in the hands of corporations." The mortmain legislation of the Middle Ages indicates that the corporation, as adapted for the holding of ecclesiastical property, was not only a secure, but a prosperous method of tenure in times of feudal warfare. In one instance, the Middle Ages improved upon the Roman concept of the corporation. The corporation sole was a refinement of the canon lawyers. Its most familiar instance in English law is the bishop, the vicar, or the pastor, who succeeds to the rights of an office and by consequence to the sole custody of its temporalities. Blackstone's division of corporation into lay and ecclesiastical (Commentaries, Book II, ch. 18) has no application in the United States where all incorporated religious societies are treated as private civic corporations." (Catholic Encyclopedia)
From Timur Kuran: "Following the split of Christianity in 1054, and during the struggle to emancipate religion from the control of emperors, kings, and feudal lords (1075-1122), the Roman Catholic Church began calling itself a corporation. This struggle, considered to have culminated in the Papal Revolution,19 gave rise to the new canon law (jus novum) of the Catholic Church. Canon law, which dealt with a wide range ofissues, including jurisdiction, property, and contracts, built on innumerable concepts, enactments, and rules belonging to the inherited secular and ecclesiastical legal systems. Unlike its forerunners, however, it emerged as a systematized body of law. Articulated in texts, it was supported by theories pertaining to the sources of law.
During the incorporation wave of the sixth through eleventh centuries, all across western Europe the clergy had developed a collective self-consciousness and formed effectively autonomous religious organizations. Now, by claiming a corporate identity of its own, the entire Church sought to differentiate itself from the secular world, separate its assets from those of its members, and weave detached clerical collectives into what has been called a “translocal, transtribal, transfeudal, and transnational” corporation with an autonomously shaped chain of authority. The move would also enhance the power of the Church over clergy by weakening clerical bonds to competing sources of authority, such as the family. Where states regained power, the assertion of legal personhood, too, began to matter. Meanwhile, other attempts were made to form corporations with large memberships and elaborate legal systems. Thousands of towns in northern Italy, France, England, and Germany acquired a corporate identity, in some cases through a royal charter, in others simply through the will of residents and the recognition of outsiders."