All the countries I know with some form of mandatory ID (the Netherlands being the only one I know where carrying ID is mandatory, but there are other where you have to hold an officially sanctioned form of ID and be able to present it within 24 hours or some other short delay) also issue ID cards so that most citizens would have one beside their passports (if they even have a passport).
Beyond that, in the specific case of the Netherlands, a Dutch residence permit or driving license (but not a residence permit from another EU country) or a national ID card from another EU/EEA country are also accepted as valid ID for official purposes. This gives foreign residents in the Netherlands some options beyond their passport.
That does not mean that such laws are written with convenience in mind or that it's not possible to end up in a situation where you have nothing at hand to identify yourself. And of course, national ID cards, driving licenses, etc. all cost money and time to renew.
For example, if you're a Brit living in the Netherlands, you don't drive and you need a visa from a country that keeps passports for a long time, you're out of luck. You might be able to get a second passport but if not, you have no other valid form of ID (the UK does not issue ID cards and residence permits are not mandatory for EU citizens, don't know if you can even get one).