This Gemara mentions the principle of דיו לבא מן הדין להיות כנדון which is an essential hermeneutical principle. That being, when making a kal v’chomer inference, which is when we understand that a certain rule or restriction applies to a lesser matter, then surely it must apply to a more serious matter.

The principle of “Dayo” limits the application to only something as severe as the originating rule. Thus for example, if I say, “All American Citizens must abide by a quarantine”, kal v’chomer, surely, those non-citizens with student visas must abide by quarantine. Now, theoretically I could even suggest that if citizens are required one week of quarantine surely non-citizens should be required an even longer quarantine - maybe two weeks. Comes along the principle of Dayo and says that we cannot extrapolate additional days beyond the original rule, so even non-citizens are quarantined only a week.

The Gemara (Bava Kama 25a) derives the principle of Dayo from the incident where Miriam was smitten with leprosy after criticizing Moshe. Even after Moshe prays for her healing, G-d responds that though He will heal her, she will have to be banished for seven days. After all, G-d says, “If she were rebuked by her father would she not feel banished for seven days?”

דיו דאורייתא הוא דתניא מדין ק"ו כיצד (במדבר יב, יד) ויאמר ה' אל משה ואביה ירק ירק בפניה הלא תכלם שבעת ימים ק"ו לשכינה ארבעה עשר יום אלא דיו לבא מן הדין להיות כנדון

Dayo, is an aspect of Torah law, as it is taught in a baraita: The Sages said that one of the ways in which the Torah may be interpreted is by an a fortiori inference. How is this so? It is written (Numbers 12:14): “And the Lord said to Moses: If her father had but spit in her face, should she not hide in shame seven days? Let her be shut up seven days outside the camp, and after that she shall be brought in again,” and therefore, using an a fortiori inference it can be derived that if the Divine Presence reprimanded her, she should hide in shame for fourteen days. Why was Miriam banished for only seven days? Rather, it is because it is sufficient for the conclusion that emerged from the a fortiori inference to be like the source of the inference. Consequently, this principle is mandated by the Torah itself.

The commentaries raise an interesting question, in the Gemara’s original supposition before the limiting principle of Dayo is applied, the Gemara suggests Miriam should have been in quarantine for 14 days, double the seven that she would feel if she had disrespected her father. Where did the number 14 come from? Why not ten, why not 100 days?  The Ramban answers, double is just a typical amount and a figure of speech. Tosafos in one answer suggests that since a metzora (leprous person) is quarantined in sets of seven days, it’s reasonable to posit an additional set of seven days for the more severe case.

No matter, we see a ancient version of quarantine. While I am not a fan of claiming that we know why G-d does what he does. Corona can be about anything. Still, it is something to ponder that perhaps the various enforced quarantines that the world wide community is experiencing may have the same attributions that our sages teach in regard to tzoraas. The Gemara (Arachim 16a) tells us a number of sins that cause tzoraas, so take your pick to work on:

א"ר שמואל בר נחמני א"ר יוחנן על שבעה דברים נגעים באין על לשון הרע ועל שפיכות דמים ועל שבועת שוא ועל גילוי עריות ועל גסות הרוח ועל הגזל ועל צרות העין

Rabbi Shmuel bar Naḥmani says that Rabbi Yoḥanan says: Leprous marks come and afflict a person for seven sinful matters: For malicious speech, for bloodshed, for an oath taken in vain, for forbidden sexual relations, for arrogance, for theft, and for stinginess.