In the digital age where all passport data is digital and accessible by authorities, how are fake passports possible?

To give you context, I’ve been reading news about people getting caught travelling with fake passports. However they have used the same passports to travel in the past.

My question is, all your data with the government is digital. Passport offices will store everything including your photo and biometrics, and this data will be shared with the immigration authorities, at least in the passport’s country of origin, and possibly sharing with immigration authorities around the world. So if someone has a fake passport from let’s say Germany, he would be unable to leave Germany on that passport as no details exist in the immigration data base. How are fake passports still continue to exist??