R’JH Hertz wrote that the laws of purity and impurity were faithfully observed in Israel from earliest times. Commentators advocated two distinct views regarding the laws; hygienic or purely religious, although they are not mutually exclusive.
Advocates of the hygienic view argued that the sources of impurity – disease, death, skin disorders or issues to do with sexual relations or childbirth – were physical. The purpose of the laws was to prevent infection, and the prescribed purification was really disinfection.
The alternative view was that the purpose of the laws was to lead the people to holiness, and to preserve them from doing anything that would be defiling.
These two views were not mutually incompatible. In the same way, the observance of Shabbat was assigned both religious and social motives, and the laws of kashrut had both reasons of holiness and reasons of hygiene.