The simple answer is that it's because the International Civil Aviation Organisation (ICAO) - the global organisation that is responsible for settings standards for passports - recommends that they should be valid for no more than 10 years.
For example, the ICAO " Guide for Assessing Security of Handling and Issuance of Travel Documents " states that : Passport Validity Period
[...]
Recommended Practice 3.16 - Contracting States should normally providethat such passports be valid for a period of at least five years…Note1 —
In consideration of the limited durability of documents and thechanging appearance of the passport holder over time, a validityperiod of not more than ten years is recommended Of course the question then becomes why does ICAO have such a requirement!
In addition to the obvious reason that the biometric data on the passport (at a minimum, the photo) will be out of date after a period of time, the primary reason for expiring passports is likely to be that it allows the underlying technology to change without there being too many legacy passports in circulation.
For example, most countries started implementing "Machine Readable Passports" in the 1980's.
Given a maximum expiry of 10 years, that meant that by the year 2000 it could be guaranteed that people from most countries had an MRP, and thus countries could start to enforce their use - such as how the US did in the mid-2000's.
If passports had a 20+ year expiry, then even today there wouldn't be a guarantee that people would have MRPs.
The same is true for "electronic" passports.
For example, Australia started issuing these in 2005, which means by the end of 2015 countries will be able to enforce that Australian passports must be electronic.
Expiring passports also reduces the number of stolen/forged/etc passports in circulation - both due to the expiry of those that are in circulation, but also by enforcing newer anti-forgery standards for new passports.
travel.stackexchange.com/users/984/Doc
First, the answer that states that passports expire because of ICAO rules is wrong, ICAO annex 9 (Facilitation) section 3.5.4 regarding passports is: 3.5.4 Recommended Practice.
— Contracting Statesshould issue passports with an initial period of validity of atleast five years, valid for an unlimited number of journeys andfor all countries, except in special circumstances. and section 3.5.5: 3.5.5 Recommended Practice.
— Contracting Statesshould institute simple procedures for the renewal orreplacement of passports and grant the same period of validityfor the new or renewed passport as for the initial issue.
So, there is no global limitation of the passport validity, there is a recommendation of 5 years initial validity.
There are some countries issue passports for 3 years, some other issue passports with a validity that exceeds 10 years.
It totally depends on the country, still most of them are following ICAO recommendations and issue passports of 5 years.
The reasons are: As in driving licenses, national IDs and other photo IDs, people's looks change over time.
So a fresh photo is required every few years to keep things up to date.
For some countries there are the security measures, the longer the passport design stays the same, the bigger the chance of fraud is.
Economic reasons, making more jobs.
Renewing passports is not free, the money for the passports are usually much more than the actual cost of passport while there is another recommendation by ICAO regarding this
but few countries follow that: 3.5.6 Recommended Practice.
—
If any fee is chargedfor the issue or renewal of a passport, the amount of such feeshould not exceed the cost of the operation.
finally, ICAO recommends the renewal of passports every few years, which is recommended to be five years as mentioned above.
travel.stackexchange.com/users/10051/Nean Der Thal
The biggest reason.
Your appearance changes with age, so the fresh picture is needed.
travel.stackexchange.com/users/1372/Karlson
In addition to the other answers, there may be laws local to the issuing countries.
For example, Germany prohibits creating unique identification numbers for people.
If the passport or ID card number would remain unchanged for a greater amount of time, this number could be used as an identification number (as citizens get at most one ID card and two passports), so documents with new, unrelated numbers have to be issued every ten years, and any documentation about the old number deleted from government databases as soon as the document is marked invalid (non-government databases are forbidden from storing the number at all).
travel.stackexchange.com/users/747/Simon Richter
The main motivation for passports to have an expiry date is to minimize identity fraud.
Not all immigration authorities are able to take extra identity check measures, and if passports expire in a reasonable amount of time, chances of identity fraud such as travelling on stolen passports will decrease.
Another reason is that, if passports expire, people will get new passports.
Because passport designs are updated, passport expiry will force people to get the new passports.
Updating the photo probably is not the biggest reason.
After all, photos are far from a reliable method to verify identity, and states/regions also rely on other measures to verify the person's identity, e.g. taking fingerprints at visa issuance & checking it at the border control (like the US).
Also, identity documents that never expire are not unseen (such as the Hong Kong Permanent Resident Identity Card).
travel.stackexchange.com/users/55892/xuq01
The ethical reasons are: To update biometric information (photo) To permit adoption of new technology To minimize fraud
travel.stackexchange.com/users/57556/Fred Sheehan
Based on  this question , why do passports expire? What possible function does it serve to limit their validity in time?
Why do passports expire?
travel.stackexchange.com
<passports><factoids>
travel.stackexchange.com/questions/21077
travel.stackexchange.com/users/2786/Ansari
The International Civil Aviation Organisation (ICAO) - the global organisation that is responsible for settings standards for passports - recommends that they should be valid for no more than 10 years.  The ethical reasons are: to update biometric information (photo), to permit adoption of new technology, and to minimise fraud such as travelling on stolen passports.  The International Civil Aviation Authority issues recommendations on passport validity, probably in an attempt to minimize fraud. However, as people's appearance changes over time, the need for a new photo could be another reason. Furthermore, updating the passport technology could be why passports need to be renewed every 5 to 10 years.
International Civil Aviation Authority makes recommendations about passports including their validity. Probably the main reason for this is to prevent fraud. Appearance and the need for a new photo may or may not be the main reason for passports expiring. Updating the passport os the main reason for it expiring.