When in 1940 the German occupiers took over, those records turned out to be very useful for their genocide.
*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.