To understand how to contextualize the meaning of various rules of eating food, or Priesthood medical inspections under the Mosaic we need to understand the overall purpose. In a nutshell the reason why these laws were added was to bring about an awareness of sin. This was achieved partly through symbols (non sinful things represented symbolically as sin) and partly through listing actual sins directly in a codified legalistic compilation, i.e. the moral laws.
If there was actually any practical benefit of some obscure ritual or dietary restrictions is secondary to the principal purpose -- of making an awareness of sin. In some cases there need not be any practical benefit at all. In the case of the seemingly medicinal inspections for mold in the camp and the quarantine of contagious diseases, there does seem to be a practical element wrapped within the symbolic purpose, but really it is the symbols of filth and disease of sin that counts. Although a rule may have no practical meaning, Wthnrespect to the medicinal inspections a practical rule was surely warpped in the symbol. In the case of leprosy where white formations covered the whole body but there were not any open sores it was a sign that it was not leprosy but another non contagious disease. Nobody declared clean was highly contagious that was part of the reason for the inspection. Also no symbolic rite was positively harmful.
The third case is looked upon according to differing medical views, either as a different disease, the lepra vulgaris, which “scarcely affects the general health, and for the most part disappears of itself, though it often lasts for years” (Clark); or as a case of the true leprosy in which “the breaking out of the leprous matter in this complete and rapid way upon the surface of the whole body was the crisis of the disease; the diseased matter turned into a scurf, which died away and then fell off” (Keil). Patrick compares it to the eruptions in measles and small pox, when there is safety in their full development. The suspected person thus either had a harmless disease, or he had had the leprosy and was cured. In either case sentence of cleanness was to be pronounced. (Lange's Commentary on Leviticus)
The main symbolism of arbitrary diet laws or obscure rites, whether having practical benefit or not, was in 'externally' symbolizing the need to 'separate oneself' from the world or separate the world from Israel. As Abraham 'cut' himself off from the world, leaving his people by faith, so did his children cut away the flesh of their foreskin. In the same way many foods and practices among heathens, were cut away, like the foreskin, as a symbol. Also defiled things in the camp of Israel was to be cut away or quarantined from infecting the rest. This separation of things and restrictions even encompassed the removing of perfectly useful objects such as yeast during the passover feast.
In addition to this need to be 'separate', 'cut away from' and 'holy' in a somewhat 'figurative sense', a livid awareness of the external impurity of sin, ultimately the cause of all disease, mold, corruption and death was to be made. The entire result was an increased awareness of sin. Anyone burdened with constant rites of 'do not touch', 'do not eat' and of 'purifications' etc., often under the threat of capital punishment would become aware of sin for sure! In addition to the awareness of sin, the moral commands and their serious threatenings established a full sense of guilt, requiring atonement. This goes hand in hand with the levitical sacrificial rites. All this sin, guilt, death and sacrifice was meant to increase awareness of sin and increase sin itself.
The law was brought in so that the trespass might increase. But where sin increased, grace increased all the more (Romans 5:20, NIV)
By becoming more wicked and aware of it, an unbelieving Jew would find solace in the promise of a Messiah, become a believing Jew like Abraham, a born again Jew having faith in Messiah. In other words, the purpose of the law was to lead us to Christ as a harsh school master. This leading included every obscure rule that separated the Jew from the world and enabled their communal life under the theocracy in an awareness of sin, guilt and death.
So the law was our guardian until Christ came that we might be justified by faith. Now that this faith has come, we are no longer under a guardian. (Galatians 3:24-25, NIV)
Guardian in this verse is παιδαγωγοσ paidagogos; a servant whose office it was to take the children to school. In other words a tutor, instructor, or schoolmaster. The idea is that while under the shadow of the mosaic law the people of God were not treated as real full sons with responsibility, knowledge and authority in the family, but as mere toddlers managed under a servant of the home. Schoolmasters are often considered harsh in that they do not have the natural affections of a parent and since their rod of disciple in this sense was to instill terror, guilt and the increase of sin.