Although not common, some countries issue passports to non-citizens as well. As you may have noticed, the data page of a passport often states the nationality or citizenship of the holder in a separate field and the citizenship may actually differ from the issuing country.
One example is laissez-passerlaissez-passer documents or emergency passports, which may be issued by foreign governments. E.g. For example, if you travel to a country without a diplomatic representation from your home country and looselose your passport, your home country may have an agreement with a 3rdthird country to help you with a temporary emergency passport.
Another example is the British Passport, which can be issued to all British nationals, even if they are not British citizens (British nationality law makes a clear difference between "nationals" and "citizens").