The fantastic (and very carefully cited/annotated) IBM and the Holocaust helps to answer that. The answer is the birth of the data era. A German subsidiary of IBM sold the reich punchcard machines, along with the engineers and know how, and they modernized 18th and 19th century records to backtrace who the current inhabitants were the descendents of.
This meant sending people out to read the tombstones, and coding up all of the birth and death registers. People who were several generations assimilated (ie thought of themselves as christian majority) were suddenly plucked out of society and informed of their jewish heritage. Much to their surprise (and chagrin).
Addiitonally, culture is revivalist in ghettos, and a great deal of yiddish/new york culture as well as jewish nationalism that lead to Israel's foundation grew out of the number of jews who were brought back into the umbrella of Judaism as a result of the Shoa. (Holocaust). These were urbane, middle class members of society who didn't have any cultural or familial links with illiterate 'shtetl' Jews, and who were forced out of society and into first the Warsaw ghetto and later the camps.
In the first world war it was viewed as a religion, and conversions and marriages were considered sufficient to preserve one from pogroms, but the world war II approach focused on modern data methods and an obsessions with racial purity.
fyi, you'll find some previous responses in this thread, plus follow the link inside to a bunch more posts
if you have followup questions on locked posts, ask them here & include the relevant user's username so they'll get an auto-notification