@Nearly all ~195@sovereign countries worldwide maintain government offices for issuing passports and national IDs. Most also provide these services via embassies/consulates abroad for citizens overseas—like Somalia's new ID registration at its Nairobi embassy. It's standard diplomatic practice.
1

