It’s obligatory in France. Until recently the french ID was comically large which led to men having to carry massive wallets which gave rise to the ubiquitous “man bag”.
But yeah, the previous card was ridiculously large.
However, police forces are allowed to ask anyone their identity without any reason, and if they can't justify of their identity, they can be detained by the police for up to 4 hours for verification, and Police may requires them to do a fingerprint scan: https://www.service-public.fr/particuliers/vosdroits/F1036
https://www.service-public.fr/particuliers/vosdroits/F11601?...