Essentially through the efforts of the communities to maintain it. The Jewish population placed a high value on teaching their religion to their children, on the community life and on the rituals (sometimes to the point of not being assimilated into the local culture) and this ensured that their religion survived