"select * from individual where religion = 'muslim'"
You would think it's that easy as the "government knows all". But from working on government databases and systems, it's hardly the case. Disparate systems, competing departments, endless workshops that hold up progress, political spats, etc. And this isn't even in a country like the US that has separate states!
For "social security" benefits. Yes. And look how that's turned out. It's deemed proof of citizenship (and a vital document) despite being just a poor quality piece of paper.
The data is misused in just about every way. From colleges using it as a student id number to people committing crimes with it.