Passports only became truly widespread after the First World War. In 1914, passports were re-introduced in order to increase domestic security. They were made compulsory in order to know who was moving in and out of countries, to keep an eye out for spies, and to keep skilled nationals at home.
https://www.messynessychic.com/2021/01/22/a-curious-journey-through-the-story-of-the-passport