I am talking about Switzerland. So why is there often a line for the place next to the date? Is it for some historic reason, to be easier to archive or is it to prevent fraud? Does anybody know more since when this is done and why?
The validity of the execution of a contract is governed by the law of the place where it was signed. A location next to the date establishes that place and hence often, the governing law for the validity of that signature.
If the contract does not expressly state what law governs, the contract itself is governed by the law of the place where the last signature that causes the contract to come into being, since that is where the contract was formed.
The role in plays in allowing someone to prove or disprove forgery is secondary, but sometimes pertinent.
The practice of noting a location as well as a date remains in place for notarized documents and court documents even in modern U.S. practice which has abandoned many of the conventions of Roman civil law and no longer routinely includes a locations next to a date line in ordinary contract executions. The location is also important in notarized documents in addition to the other reasons, because the location establishes whether the notary is acting within the notary's jurisdiction which historically involves very small geographical areas, although the modern trend has to expand the geographic range of a notary's jurisdiction.
This is particularly important in a place like Switzerland, where there are relatively few good clues regarding where a contract was signed in the absence of a designation (since short distances can result in a change of jurisdiction and multiple countries share any likely language in which the contract is written) and where the substantive law that applies to the contract can vary from canton to canton even within the country.
This practice proximately dates to the reception of Roman civil law in the late Middle Ages following a "lawless" period from the fall of the Roman empire through the early Middle Ages. This revived a practice that existed for most of the Roman Empire and predecessor Roman Republic in the middle Iron Age.
A similar practice was used, however, in diplomatic and royal correspondence in the broad Eastern Mediterranean and Fertile Crescent region during the Bronze Age. This was done at that time partially for authentication, partially to provide context for a communication (at a time when messages wouldn't necessarily be delivered in sequence), and partially to create a historical record of a diplomat or aristocrat's travels.