*religious affiliation
It makes sense that ethnicity would have been recorded as well, but FAFAIK the Germans mostly used the data on religious identity (i.e. which persons were a member of which church community).
Tangentially related, it's why things like period trackers are dangerous too; the US has had a spate of anti-abortion laws, the data from those apps (if used) can be used to detect pregnancies and whether they have stopped prematurely. For example.
It is in the context of taxes if you agree that regligious organizations would receive church tax from the government.