Also, as another child comment said, filling out religion and gender is optional, and no form ever asks for race (at least in Germany and Switzerland I know that for sure).
On the other hand, having better data about citizens makes a lot of things more efficient and fair in government and politics. As I said, I think the US Census is a disaster and always leads to unfair outcomes for minorities and lower class people.
But I agree, it would be better if they woulnd't ask for religion at all.
The American model is highly distributed and need-to-know. Many government forms ask for your current address, but it is not automatically shared with the police and there is no requirement to update it in a timely manner.
Many Americans are highly skeptical of the police, and for good reason. Expecting people to go to the police to register when moving would be a complete non-starter in most neighborhoods that I have lived.
Everywhere else in the world, if you strongly support a party, you join it, and pay a membership fee, and the party adds you to a register. Then, you can take part in party activities, like internal elections.
In the US, you register as a supporter of a particular party with the state. Then, everyone registered can take part in (some) party activities, like primaries.
It's a weird system, and i don't know how it started, but because Americans don't realise it's weird, there isn't much written about it!
First we have a system of primary elections, and in many jurisdictions your party registration status determines which primary you can vote in. You have to be registered Democrat to vote Democrat, registered Republican to vote Republican, etc. The local election board is the one who oversees to vote, so they need to know your party registration in order to make sure you get the right ballot and the right ballot information (which is sent by mail beforehand). In many jurisdictions you can also "decline to state" and then in a primary election you have to tell them each time which ballot you want.
Second, it's used in state redistricting. Having this information be public allows auditors to check if redistricting is resulting in gerrymandering.
In other countries parties run their own candidate selections as private business and the state can’t meddle in it, so the state doesn’t have to ask what what your affiliation is.
Disclaimer: I'm not complaining about how it is in Germany/other countries in Europe. The trust in government is quite high here, and for a good reason :)
As it relates to ethnicity, you're right. I can no longer edit my original comment though.
I suppose it's cultural differences. There's a staunchly individualistic attitude in the US and the idea of a central government tracking its citizens is very unpopular. I get it, too. If you take a look at the "Anmeldung" process in Germany, where the government has a list of everyone and their race/religion/nationality, along with exactly where they live/which building/which floor/which side of the building, you can see how such a system could be dangerous if Germany were to ever shift from the liberal democracy it is today.