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”.
For people who don't read French, yes on paper there is no legal obligation to have any kind of ID on you.
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
But yeah, the previous card was ridiculously large.